Home > How-To Library > Forms

How to center the form on the screen

**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * ****************************************************************
'A simple two lines of coding that centers your form on the screen. Screen resolution, form name 'and form size are not restricted. Me.Left = (Screen.Width / 2) - (Me.Width / 2) Me.Top = (Screen.Height / 2) - (Me.Height / 2)

If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.