Cls Method (AForm)

Clears graphics and text generated at run time from an object.

Syntax

Object.Cls()

The Cls method syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

Comments

Cls clears text and graphics generated at run time by graphics and drawing functions. Background color and the form Picture is restored and drawn on the form client area. aps set using the Picture property and controls placed on a Form at design time are not affected by Cls.

After Cls is invoked, the CurrentX and CurrentY properties of the object are reset to 0.

The method is not applicable for MDI Form type since drawing functions are not supported for MDI Forms.

Example

The following statement changes the AForm to clear graphics and text generated at run time:

frm1.Cls()

Applies to

AForm

See Also

AutoRedraw, CurrentX, CurrentY, Picture