Nazgulled Posted January 17, 2005 Posted January 17, 2005 My app has a notify icon and when clicking on it I want to know if my app is the most on top or not. If it is it means it's visible, I can see it. If it's not, then maybe something is in front of it (talking about maximized apps only, doesn't matter if it's not the most on top but visible anyway, doesn't matter that). How can I find out if my app is the topest one? Or, how can I get the title of the topest window, so I could compare to my app? Quote
coldfusion244 Posted January 17, 2005 Posted January 17, 2005 You can use GetForeGroundWindow...http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getforegroundwindow.asp and compare the HWND's... I'm sure there is a .NET way how to do it too, I just don't know it :( Quote -Sean
Nazgulled Posted January 17, 2005 Author Posted January 17, 2005 that won't work... when I click the notify icon, the HWND will be the one from my form's window, I can't compare to myself... it will always be true with that... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.