System.Windows.Forms.Form.Modal Property

Gets a value indicating whether this form is displayed modally.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(false)]
public bool Modal { get; }

Value

Documentation for this section has not yet been entered.

Remarks

When a form is displayed modally, no input (keyboard or mouse click) can occur except to objects on the modal form. The program must hide or close a modal form (usually in response to some user action) before input to another form can occur. Forms that are displayed modally are typically used as dialog boxes in an application.

You can use this property to determine whether a form that you have obtained from a method or property has been displayed modally.

To display a form modally use the Form.ShowDialog method.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0
Since: .NET 2.0