How to center a form

domoputro

Registered User.
Local time
Today, 13:57
Joined
Apr 2, 2003
Messages
11
How do you code in the VB to center a form everytime you open it?
It seems that my autocenter attribute in the form properties is not working.
I have 2 forms with same sizes. I want them both to open in the center on top of each other.

Thanks...
 
Set the forms as Popups

IMO
 
What about a code to maximize window everytime a form opens?

Thanks IMO.
 
in the OnOpen event put this line.

DoCmd.Maximise


and OnClose

DoCmd.Restore
 
In the Open event of the form type

DoCmd.Maximize

IMO
 
Last edited:
If you wanted to position the forms without having to maximize them, you don't need to use VB code at all. The trick is to position your form while in Design View, then save it in Design View and exit. The form will always open positioned. This also works for sizing forms.

Hope this helps.

The Missinglinq
 

Users who are viewing this thread

Back
Top Bottom