ShowW Command

Purpose

Displays a window with a certain status.

Syntax

ShowW w, stat%

w%, stat%:integer expression

Description

The ShowW command is used to display a window with a particular status. This includes for example not displaying the window at all - i.e. show it as an icon or "invisible". The command requires two parameters: The first (w) specifies the window number or window handle (frm1.hWnd), the second (stat%) gives the status for the window to be displayed with. stat% must take one of the following values:

SW_HIDE (0) - hides a window and redirects its input to the next one.

SW_MINIMIZE (6) - minimizes (iconizes) a window and activates the Top Level window from the window manager list.

SW_RESTORE (9) - same as SW_SHOWNORMAL

SW_SHOW (5) - activates a window and places it at the current position using the current dimensions.

SW_SHOWMAXIMIZED (3) - activates a window and uses its maximum dimensions.

SW_SHOWMINIMIZED (2) - activates the window and displays it as an icon.

SW_SHOWMINNOACTIVE (7) - displays a window as an icon but keeps the current window active.

SW_SHOWNA (8) - displays a window using its current status but keeps the current window active.

SW_SHOWNOACTIVATE (4) - displays a window at its last position and in latest dimension but keeps the current window active.

SW_SHOWNORMAL (1) - activates a window and displays it. For maximized and minimized windows Windows restores the previous position and dimension.

Example

OpenW # 1

OpenW # 2

ShowW 1, SW_SHOWMINIMIZED

Do

GetEvent

Until MouseK %& 2

CloseW # 2

CloseW # 1

Opens window 1 and minimizes it...

Remarks

The command ShowW corresponds to Windows function ShowWindow().

See Also

Iconic?(), Visible?(), Zoomed?()

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