Form.move ?

Zana Maseluta
04-07-2003, 02:16 AM
I make a program designed for 800*600 rezolution monitor,and i wrote in form.load : Form.move 0,0.
But in rezolution 1024*768 i want to move my form to fit in the center of monitor.
Is something with Screen,but i don't have MSDN...

04-07-2003, 02:27 AM
If you have a form, that has to be the same size in all of the different resolutions, you could use code like this to center your form:
Private Sub Form_Load()
Me.Top = Screen.Height / 2 - Me.Height / 2
Me.Left = Screen.Width / 2 - Me.Width / 2
End Sub
Think this code is pretty usefull for you.

Zana Maseluta
04-07-2003, 02:32 AM
That's it !
Thanks Irotallic,you're fast...

04-07-2003, 03:32 AM
It's also a property of the Form itself.
In the IDE you can set the StartUpPosition of the form.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum