ProgressDialogShowDialog Method (IWin32Window) |
Namespace: Ookii.Dialogs
Exception | Condition |
---|---|
InvalidOperationException | The animation specified in the Animation property could not be loaded, or the operation is already running. |
The ShowDialog function for most .Net dialogs will not return until the dialog is closed. However, the ShowDialog function for the ProgressDialog class will return immediately. The parent window will be disabled as with all modal dialogs.
Although this function returns immediately, you cannot use the UI thread to do any processing. The dialog will not function correctly unless the UI thread continues to handle window messages, so that thread may not be blocked by some other activity. All processing related to the progress dialog must be done in the DoWork event handler.
The progress dialog's window will appear in the taskbar. This behaviour is also contrary to most .Net dialogs, but is part of the underlying native progress dialog API so cannot be avoided.
When possible, it is recommended that you use a modeless dialog using the Show function.