Try this code. Hope it can help.
In your module copy then paste this code:
Public Sub CenterForm(f As Form, w)
f.Left = (w.ScaleWidth - f.Width) / 2
f.Top = (w.ScaleHeight - f.Height) / 2
End Sub
In your Form Load:
Private Sub Form_Load()
CenterForm Me, Main
End Sub
This code will centering your form in mdiparent
Showing posts with label Form. Show all posts
Showing posts with label Form. Show all posts
Thursday, August 21, 2008
Subscribe to:
Posts (Atom)