Returns or sets the visual state of the form window at run time.
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. |
Name |
Value |
Description |
aformWindowStateNormal |
0 |
Normal |
aformWindowStateMinimized |
1 |
Minimized |
aformWindowStateMaximized |
2 |
Maximized |
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.
The following statement changes the AForm WindowState to maximized:
frm1.WindowState=aformWindowStateMaximized
Height, Left, ScaleHeight, ScaleWidth, Top, Visible, Width