Tools Links Login

Center_Form

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

Original Author: Ian Ippolito (psc)

Inputs

frmForm--form to center. Call this function like this:Center_Form Me

Code

Sub Center_Form (frmForm As Form)
frmForm.Left = (Screen.Width - frmForm.Width) / 2
frmForm.Top = (Screen.Height - frmForm.Height) / 2
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 85 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.