Get window State (Hide/show)

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by GPI.

It is to hide a window with HideWindow().

But how do i get the state of the window (hide or show). I need a API-Function for this.

Thanks for helping.

GPI

PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

Code: Select all

If IsWindowVisible_(handle)=#TRUE
  Debug "Window is visible"
Else
  Debug "Window is invisible"
EndIf
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by dmoc.

Easiest way is to keep a variable but IsWindowVisible_(WindowID()) may help (not sure if correct one). Here's some info from API-Guide at http://www.allapi.net ...

If the specified window and its parent window have the WS_VISIBLE style, the return value is nonzero.

If the specified window and its parent window do not have the WS_VISIBLE style, the return value is zero. Because the return value specifies whether the window has the WS_VISIBLE style, it may be nonzero even if the window is totally obscured by other windows.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by GPI.

@pb
Thanks. This is what i want.

@dmoc
I want only ask the WS_VISIBLE.

PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
Post Reply