CodeItBetter Programming Another VB Programming Blog

How to center the form on the screen

Posted on August 27, 2011
1
2
3
4
5
6
'Forms - How to center the form on the screen
'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)
Filed under: Forms Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.