Visible? Function

Purpose

Returns True if the window/Form is visible.

Syntax

? = Visible?(wh%)

wh%:integer expression

Description

The only parameter wh% for this function specifies the number or the handle of the window for which the status is to be returned.

Example

OpenW 1, 10, 10, 300, 200 : TitleW 1, "Window 1"

Ocx CheckBox chk = "Show Window 2", 10, 10, 120, 14

Ocx Label lbl = "Window 2 is Invisible", 10, 30, 120, 14

OpenW Hidden 2, 320, 10, 300, 200 : TitleW 2, "Window 2"

Do : Sleep : Until Win_1 Is Nothing Or Win_2 Is Nothing

CloseW 1 : CloseW 2

 

Sub chk_Click

Win_2.Visible = -chk.Value

lbl.Caption = "Window 2 is " & (Visible?(Win_2.hWnd) ? "Visible" : "Invisible")

EndSub

Remarks

For forms it is easier to inspect the Visible property.

Visible?() corresponds to the Windows function IsWindowVisible()

See Also

Enabled?(), Iconic?(), Zoomed?(), WindowState

{Created by Sjouke Hamstra; Last updated: 25/10/2014 by James Gaite}