Calling Form.Visible will return true regardless of whether the form is maximum, minimized, or has a FormWindowState of Normal.
I want to know how to determine if a form is open, but “hidden” behind another application window.
If this is the case, I want to bring it to the forefront and actually make it visible to the user.
I tried the BringToFront () method, but that did not work. I also tried calling the Show () method, but if the form is behind another application window, it remains so.
The only workaround I found in this problem is setting the FormWindowState form to Minimized / Maximized and then to a normal one, but a bit hacked and doesn't look pretty.
Can someone tell me how to determine if the form is behind another window and how to bring it to the fore?
source
share