Visual Basic Reference
Returns or sets a value indicating the visual state of a form window at run time.
object.WindowState [= value]
The WindowState property syntax has these parts:
|Object||An object expression that evaluates to an object in the Applies To list.|
|Value||An integer specifying the state of the object, as described in Settings.|
The settings for value are:
|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's 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.