This property returns and sets a value that indicates the visual state of a form window at run time.
object.WindowState [= value]
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.