CenterForm
To center all of your forms nicely on the screen, use this as the first line in the Form_Load event--resolution independent.
'note:call this function like this:
Center_Form Me
Inputs
frmForm--form to center. Call this function like this:Center_Form Me
Rate CenterForm
(39(39 Vote))
Sub Center_Form (frmForm As Form)
frmForm.Left = (Screen.Width - frmForm.Width) / 2
frmForm.Top = (Screen.Height - frmForm.Height) / 2
End Sub
CenterForm Comments
No comments yet — be the first to post one!
Post a Comment