|
How do
I center a form?
If you are using VB4, the form
does not have a StartUpPosition
property. However, there is an easy
way to center the form at startup.
Simply copy the code below into a module
in your project. You can then center
every form by calling CenterForm(me) in
the load event of all forms.
Public Sub CenterForm(frm As Form)
frm.Top = (Screen.Height -
frm.Height) / 2
frm.Left = (Screen.Width -
frm.Width) / 2
End Sub
|
|
|
|