Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make forms same size and appear at same point on screen 1

Status
Not open for further replies.

NIWANut

Programmer
May 20, 2003
25
NZ
Hi,

I have multiple forms in an Access extraction application where when the user presses the Next button it closes the present form and opens another. My problem is that they seem to have a mind of their own where they are displayed on the screen. I have been very careful to ensure that all the properties of the forms are the same, the width property is set the same, the Auto Resize property is set to No and I set the Auto Center property to Yes. I thought this would place them all at the same point on the screen but they move up and down 1-2 cm and nothing seems to fix them in place. All forms have similar buttons (Cancel, Back and Next) which I have made sure are at the same co-ordinates on each form hoping that when the form is displayed on the screen the buttons will be at the same place.

I personally find it very annoying to have forms jump around like this.



George
 
If you set the form properties Height and Width the same for all of your forms will guarantee the same size. As for placement I always then set the AutoCenter to Yes. Also, set the Control Box, Min Max Buttons, and Close button the same. Other controls that have an effect on the size would be scrollbars both horizontal and vertical, record selectors, and Navigation Buttons. If you want all of the forms the same then all of these should be the same for all forms.

This is the easy way of doing what you want to do but there are other ways to position the form and I believe that it is the Grid X and Grid Y properties.

Hope this helps you in your project.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
You could experiment with the MoveSize Method, DoCmd.MoveSize
[, down][, width][, height].

This example pasted into the On Open event of a Popup Form:

DoCmd.MoveSize 0, 0

Would position the Form at the extreme Right and Top of the Screen.

Regards

Bill​
 
Try again, didn't like those brackets.

You could experiment with the MoveSize Method, DoCmd.MoveSize right, down, width, height.

This example pasted into the On Open event of a Popup Form:

DoCmd.MoveSize 0, 0

Would position the Form at the extreme Left and Top of the Screen.

Regards

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top