The IsWindowVisible function retrieves the visibility state of the specified window.
$is_visible = IsWindowVisible( $hwnd );
Handle of the window to be tested
TRUE is a window is visible. FALSE otherwise