Returns or sets a value indicating the visual state of a form window at run time.
object.WindowState [= value]
The parts of the WindowState property syntax are described in the following table.
Part | Description |
---|---|
object | An object expression that evaluates to an object. |
value | An integer specifying the state of the object, as described in Settings. |
The settings for value are described in the following table.
Constant | Value | Description |
---|---|---|
vbNormal | 0 | (Default). Normal. |
vbMinimized | 1 | Minimized (minimized to an icon) |
vbMaximized | 2 | Maximized (enlarged to maximum size) |
Before a form is displayed, the WindowState property is always set to Normal (0), regardless of its initial setting. This is reflected in the Height, Left, ScaleHeight, ScaleWidth, Top, and Width property settings. If a form is hidden after it has been shown, these properties reflect the previous state until the form is shown again, regardless of any changes made to the WindowState property in the meantime.