VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Center a form Short, Simple, and Sweet

by Scott Fitzhugh (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

This code allows you to quickly center a form within the screen without eating up alot of cpu time.

Side Effects
none. The form gets centered.
API Declarations

Rate Center a form Short, Simple, and Sweet

sub form_load()
me.left = (screen.width / 2) - (me.width / 2)
me.top = (screen.height / 2) - (me.height / 2)
end sub

Download this snippet    Add to My Saved Code

Center a form Short, Simple, and Sweet Comments

No comments have been posted about Center a form Short, Simple, and Sweet. Why not be the first to post a comment about Center a form Short, Simple, and Sweet.

Post your comment

Subject:
Message:
0/1000 characters