![]() ![]() | ||
There are a number of built-in dialog boxes in Visual Basic, which is great, because developing your own file open, file save, and other dialog boxes not only takes a lot of work, but gives your program a different look from what Windows users are already used to. We'll look at these dialogs in this chapter; here they are:
You use the ShowDialog method to display the dialog at run time and can check its return value (such as DialogResult.OK or DialogResult.Cancel) to see which button the user has clicked. Here are the possible return values from this method, from the DialogResult enumeration:
Abort— The dialog box return value is Abort (usually from a button labeled Abort).
Cancel— The dialog box return value is Cancel (usually from a button labeled Cancel).
Ignore— The dialog box return value is Ignore (usually from a button labeled Ignore).
No— The dialog box return value is No (usually from a button labeled No).
None— Nothing is returned from the dialog box. This means that the modal dialog continues running.
OK— The dialog box return value is OK (usually from a button labeled OK).
Retry— The dialog box return value is Retry (usually from a button labeled Retry).
Yes— The dialog box return value is Yes (usually from a button labeled Yes).
I'll take a closer look at these dialogs now.
![]() ![]() | ||