WindowState Property (AForm)

Returns or sets the visual state of the form window at run time.

Syntax

Object.WindowState [ = enWindowState ]

The WindowState property syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

enWindowState

enumAFormWindowState

An integer specifying the visual state of the form window at run time.

Where

enumAFormWindowState:

 

Name

Value

Description

aformWindowStateNormal

0

Normal

aformWindowStateMinimized

1

Minimized

aformWindowStateMaximized

2

Maximized

Comments

Before a form is displayed, the WindowState property is always set to "Normal", regardless of its initial setting. This is reflected in the Height, Left, ScaleHeight, ScaleWidth, Top, and Width property settings.

After a form is shown, if it is then hidden, the Height, Left, ScaleHeight, ScaleWidth, Top, and Width properties retain their settings until the form is displayed again, even if the WindowState property is changed.

Example

The following statement changes the AForm WindowState to maximized:

frm1.WindowState=aformWindowStateMaximized

Applies to

AForm

See Also

Height, Left, ScaleHeight, ScaleWidth, Top, Visible, Width