Link to home
Start Free TrialLog in
Avatar of brockway
brockway

asked on

How do I Detect Parents WindowState.

How Can A Usercontrol Detect Changes In The Windowstate Of Its Parent?

From Tim Brockway.   Email : BROCKWAYJT@AOL.COM
Version= VB5

PROBLEM DESCRIPTION.

How can a UserControl detect changes in the WindowState of its parent / containing form??

Yes I know I could call the usercontrol from the Forms resize event passing the new parent WindowState. But I'm looking for a way of intercepting the changes without having the user controls parent do any coding.

In essence I want to pick up the parents window change event from within the "child" usercontrol. Solution must be VB based.

Any ideas ? Any thoughts would be most welcome.

Many thanks,
Tim
Avatar of mrmick
mrmick

Reference it like this:

Extender.Parent.WindowState
Avatar of brockway

ASKER

Sorry I should have made the question clearer.

 When I said "INTERCEPTING" I meant just that, not detecting later. In other words I want the usercontrol to be alerted or detect the Parent form windowstate change AS IT HAPPENS not next time the UserControl is invoked.

Put another way I want the usercontrol to be aware contemporaniously of the Parents Resize event triggering.

This is a toughy but if we could solve it , it would have a lot of applications.

Many thanks for the thoughts. Keep up the good work.

Tim.
hmmm...
ASKER CERTIFIED SOLUTION
Avatar of mrmick
mrmick

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