VB6, Centering a Form on the Screen

Here is a code snippet used to center a form on the screen.

Private Sub Form_Load()
    ‘ Centering the form on the screen
    Me.Move (Screen.Width – Me.Width) \ 2, (Screen.Height – Me.Height) \ 2
End Sub

Leave a Reply