VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Center Your Form

by Stephen Glauser (3 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (8 Votes)

This will Center your form on your screen. It will also higher it a tiny bit, so it looks centered above the TaskBar.

Rate Center Your Form

Sub FormCenter (Frm As Form)
Rem Written by Stephen Glauser
Rem Last Update: August 1, 1999
Rem Centers your form on the Screen
Rem FormCenter Me
Frm.Top = (Screen.Height * .85) / 2 - Frm.Height / 2
Frm.Left = Screen.Width / 2 - Frm.Width / 2
End Sub

Download this snippet    Add to My Saved Code

Center Your Form Comments

No comments have been posted about Center Your Form. Why not be the first to post a comment about Center Your Form.

Post your comment

Subject:
Message:
0/1000 characters