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!

resize form to Access window's size

Status
Not open for further replies.

xezekielx

IS-IT--Management
Jun 30, 2005
93
CA
Is there a way to make a form the same size as Access window's? I don't want to use DoCmd.Maximise because if I use DoCmd.Restore in other forms' load event, the main form (the one I want to be 'maximised') will restore as well. I don't want to open my other forms with 'acDialog' (DoCmd.OpenForm method) because these windows can't access the menu bars.

Any help would be much appreciated.
 
you'd have to do it the hard way then...

find out the side of the access window, (I think you'll need to use api calls to do this but I could be wrong) and then set your form to that size, with the right top/left values

--------------------
Procrastinate Now!
 
Thanks for your answer! Do you (or anybody else) have an idea which API calls I would have to use? Also, I was wondering if it was possible to either disable the maximize/restore functionality of the application (not the forms, I know how to do that) OR 'catch' the window resize event (again, not the forms event, but the one for the application).

Thanks!
 
Thanks, gol4, I had figured it just before you answered :) Now the only remaining problem is that I have a button that's dynamically positioned on the main form (in the bottom right corner). Since my main form isn't really maximised per se, it won't call the 'Resize' event whenever the user resizes the application window. Does anybody know how I could trap the 'Resize' event on the app window or how the form's 'Resize' event could be called even if it's not maximised? Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top