Avatar of 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.
Microsoft Access

Avatar of undefined
Last Comment
Jim Dettman (EE MVE)

8/22/2022 - Mon

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

"Access does expose an Application object, but that object does not expose
any events, only methods and properties."
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.

DatabaseMX (Joe Anderson - Former Microsoft Access MVP)

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.

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck

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 ...
Jim Dettman (EE MVE)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question