Link to home
Start Free TrialLog in
Avatar of katie999
katie999

asked on

Capture Windows App Main Window Resize Event

I need to move a form around based on when/if a user has resized the main Access 2007 application window. Any help would be appreciated.
Avatar of COACHMAN99
COACHMAN99

sorry, mirsread the question - thought you wanted to tap the main form event.

Apparently:
"Access does expose an Application object, but that object does not expose
any events, only methods and properties."
Avatar of Jim Dettman (EE MVE)
This is not simple to do and what you have to do is not within Access.

You'd need to hook the message queue to the main access window in the OS, then determine when it moved by reading the window messages.

Jim.
Peter's Window Manipulation Examples  might get you started in the right direction. I've used this code several times in several apps for various things.

Examples of how to maximize, restore, size, hide, cascade, and animate (and more!) the main Microsoft Access window as well as your active form window.

mx
Avatar of katie999

ASKER

Thanks to prodigy - that is what I'm facing. However, I just realized that even if I access one of the various lib32 functions (e.g. windows size/position changed) I am still faced with the problem of moving the form in real time while it is being displayed. I have no problem positioning the form after the window is changed and before the form is opened, but using the form OnTimer afterwards is problematic. What I want to do may not be possible given the limited event management options in Access ...
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial