CloseW Command

Purpose

Closes a window.

Syntax

CloseW [#]wh

wh:integer expression

Description

Closes a window with window number wh (0 to _maxInt). If the window doesn't have a number, a window handle can be passed.

Example

Local a%

OpenW # 100, 10, 10, 200, 100, -1

KeyGet a%

CloseW 100

Debug.Show

 

Sub Form_Destroy(Index%)

Debug "Destroy event"

EndSub

Draws a window on the screen. When a key is pressed, the window is closed again.

Remarks

Unlike the Close method used with forms, if the window being closed with CloseW has already been closed, does not exist or has in some other way been set to Nothing, the command is ignored - no error is raised - and the program operation is not interrupted.

See Also

FullW, ClearW, OpenW, TitleW, SizeW, TopW

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