![]() |
IOBit Software
|
|
|
||||||
| Programming Place to discuss programming including HTML, Java, C++, MySQL and others. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
Can someone please tell me how I can force a form to startup at a specific x,y coordinate? |
| Sponsored links |
|
|
|
#2
|
||||
|
||||
|
You can you the Left and Top properties of the form.
Code:
Private Sub Form_Load()
frmMain.Left = 100
frmMain.Top = 100
End Sub
To set the position of the form in relation to the screen dimensions you can use the screen object. Code:
Private Sub Form_Load()
frmMain.Left = (Screen.Width - frmMain.Width) * 0.5
frmMain.Top = (Screen.Height - frmMain.Height) * 0.5
End Sub
__________________
Computer Specs: A computer, a big old monitor, keyboard, one of those mousy things for pointing |
![]() |
| Thread Tools | |
| Display Modes | |
|
|