Question Making the second topmost window the topmost window

Haxaro

Well-known member
Joined
Mar 13, 2009
Messages
105
Programming Experience
1-3
I am making an app that hides the topmost window, but when i do this, it leaves no current window selected. how can i make the highest unselected window selected?
 
When you set the TopMost property to false on a window and you set TopMost to True on the next window call it's .BringToFront() and see if that helps.
 
Sorry, i dont think i made myself clear enough. I am making an app that shows and hides other windows (the topmost window) according to its hwnd using the api's GetForeGroundWindow and ShowWindow. When i hide a window, it makes no window in focus. I Guess that the window that was hiden is still in focus, just nothing can be done with that window. I am wondering how i can get the second topmost window, by using the z order or something. Im not Completly sure I also have a problem were it hides the desktop, and if i use the api GetDesktopWindow, and GetForeGround Window, the HWNDs do not match. Would be great if you could help.

thanks :)
 
Back
Top