Share via


How-To Show Dialogs

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

Dialog boxes are special purpose user interfaces that are used by MMC snap-ins for handling standard verbs and custom actions. There are four types of dialogs:

  • Common Dialog
    A common dialog is derived from the CommonDialog class. A Color Picker Dialog, and a File Open Dialog are examples of common dialogs.

  • MessageBoxParameters Dialog
    A MessageBoxParameters dialog is a message box where a MessageBoxParameters option is available.

  • User-Defined Dialog
    A user-defined dialog is a form derived from the Windows form class. It provides for a result to be passed back to the calling code.

  • User-Defined Dialog with a Wait Cursor
    A user-defined dialog is a form derived from the Windows form class and uses a wait cursor object to suppress showing the form until the expiration of the wait period. It provides for a result to be passed back to the calling code. A wait cursor can be used to cause the Dialog to only show up after a certain amount of time has elapsed. The typical use of this approach is to provide a dialog to ask permission to abort a long running task. The dialog may never be shown if the task completes in time and the wait cursor is informed of the task completion.

Any of these dialogs must be shown using the ShowDialog method on the creating snap-in thread. For an example of a snap-in that shows a dialog, see <MMC 3.0 Samples>\ModalDialogSample.

See Also

WaitDialog
ShowDialog
How-To Create Snap-ins With Rich Features