PrintPreviewDialog.WindowState PrintPreviewDialog.WindowState PrintPreviewDialog.WindowState PrintPreviewDialog.WindowState Property


获取或设置窗体的窗口状态。Gets or sets the form's window state.

 property System::Windows::Forms::FormWindowState WindowState { System::Windows::Forms::FormWindowState get(); void set(System::Windows::Forms::FormWindowState value); };
public System.Windows.Forms.FormWindowState WindowState { get; set; }
member this.WindowState : System.Windows.Forms.FormWindowState with get, set
Public Property WindowState As FormWindowState


FormWindowState,表示窗体的窗口状态。A FormWindowState that represents the window state of the form. 默认值为 NormalThe default is Normal.


指定值不在有效值范围内。The value specified is outside the range of valid values.


在显示窗体之前, WindowState属性始终设置为FormWindowState.Normal, 而不考虑其初始设置。Before a form is displayed, the WindowState property is always set to FormWindowState.Normal, regardless of its initial setting. 这会反映Height在、 LeftTopWidth属性设置中。This is reflected in the Height, Left, Top, and Width property settings. 如果窗体在显示后被隐藏, 则这些属性将反映以前的状态, 直到再次显示窗体, 而不考虑对WindowState属性所做的任何更改。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.