views:

292

answers:

1

Looking for a way to be notified when any windows ZOrder changes?

Zorder refers to the layering of the windows. a zorder of 0 is at the bottom. I don't know any other way to ask this question.

This would be for Windows XP or newer, using .NET, c# OR vb.net.

A: 

Apparently windows will send a WM_WINDOWPOSCHANGING when your window moves/resizes/swaps z order. Combine this with GetTopWindow and GetNextWindow to work out what the current order of the windows are, and you should be able to work out where all the windows are in your app. 825595 has the details about those two API calls. 798295 has more info about GetNextWindow.

edit even though this is already accepted...

And, for anyone finding this via google, 932988 has info about how to capture these messages using WndProc. I hate to leave a question not fully answered :-)

Dan F
I guess it was not that cryptic. Thanks.
eschneider
Naw, it was OK after the edit. Looks like it might have been a bit light on for info before the edit though :-) It struck me as an interesting question though
Dan F