Center Forms

Submitted by:  Song San

Email:  songsan2000@yahoo.com

Date:  12/26/2001

Tested:  Yes

 

How to Use it:

   Copy the code and paste it to the "Form, Load" of your code.  Make sure that frmForm1 is replace by the name of the form that you want to load in the center.  So if your form name is Form1, then replace frmForm1 with Form1.

 

Code:

frmForm1.left = (Screen.Width - frmForm1.Width) / 2

frmForm1.Top = (Screen.Height - frmForm1.Height) / 2