Forms and dialog boxes are either modal or modeless. A modal form or dialog box must be closed or hidden before you can continue working with the rest of the application.
To display a form as a modal dialog box ..Call the ShowDialog method.
The following example shows how to display a dialog box modally.
# Use ShowDialog() method instead of Show() method.
To display a form as a modal dialog box ..Call the ShowDialog method.
The following example shows how to display a dialog box modally.
// C#
//Display frmAbout as a modal dialog
Form frmAbout = new Form();
frmAbout.ShowDialog();
//Display frmAbout as a modal dialog
Form frmAbout = new Form();
frmAbout.ShowDialog();
# Use ShowDialog() method instead of Show() method.
No comments:
Post a Comment