ClearW Command

Purpose

Deletes the contents of a window.

Syntax

ClearW [#]n

Description

ClearW n deletes the contents of the window with number n (0 to _maxInt). If the window doesn't have a number, the handle can be passed.

Example

OpenW 1

Local a%, i%, x%

For i% = 1 To 500

Color Rand(_C)

Line Rand(300), Rand(300), Rand(300), Rand(300)

Circle Rand(300), Rand(300), Rand(300)

Next

Color 0 : FontSize = 40

Text 50, _Y - 150, "Please press a key"

KeyGet a%

ClearW 1

FontSize = 20

Text _X / 2 - _X / 3, _Y / 2 - 20, "Window contents will be deleted"

KeyGet a%

CloseW 1

Draws a window with lines and circles. After pressing a key the window is cleared and the text "Window contents will be deleted..." is written in the window. When a key is pressed again the window is closed.

Remarks

ClearW doesn't work in the event sub Form_Paint. It generates a WM_PAINT causing an endless loop.

See Also

FullW, CloseW, OpenW, TitleW, SizeW, TopW

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