Dialog Boxes

Dialog boxes are forms that are displayed on top of other application windows. Each dialog typically has a defined purpose in the application to present additional information or gather specific input from the user. When displaying a dialog to the user, you have two modes that a dialog can be displayed in—modal and modeless.

Modal dialogs, when displayed, block input to the rest of the application. This forces the user to fill out the information correctly on the dialog before moving on. To display a modal dialog, you can call the ShowDialog method on the System.Windows.Forms.Form class. This example shows a form in a modal state:

Dim form As New Form()
form.ShowDialog()

Modeless dialogs, when displayed, do not block input to the ...

Get Visual Basic® .NET by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.