O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modeless Dialogs

VB.NET supports modeless dialogs as well as modal dialogs. You can typically identify modeless dialogs from their design: modal dialogs have OK and Cancel buttons, while modeless dialogs have Apply and Close buttons. A few programming differences must be noted:

  • The Show method is used to display the modeless dialog (instead of the ShowDialog method).

  • A DialogResult is not returned from the Show method; programmers must implement their own strategy for providing behavior for the Apply and Close buttons in the modeless dialog.

In the program ModelessDialogExample, we use a modeless dialog to add items to a list box. Figure 12-1

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required