Michael C wrote:
"vooose" <no****@microso ft.com> wrote in message
news:Oi******** ******@TK2MSFTN GP14.phx.gbl... How would you determine if a window(Form) is visible. By visible I mean
that you can currently see it, as apposed to Form.Visible. (which
returns True when the window sits behind other windows)
Using Form.Focused is no good because the form is still visible even
when its not focused.
What happens if 90% of the form is hidden by another, in your definition of
visible does that count as visible or not?
I would think 90% would be a no-brainer - clearly it's still visible.
More interesting would be the case where only 1 pixel of the form was
visible, which is possible even if it were covered only by 2
overlapping rectangular windows that intersected one pixel in from the
corner. If the OP really just wanted to know "is any pixel of my form
not covered by another window, and within the desktop bounds", it
*might* be possible by checking the windows clipping region (although
I'm not sure what API's would tell you this for the NC area), but
certainly could be calculated by examining every other overlapping
window on the desktop. Why you'd need to know this I can't imagine!