MessageDialog on Windows

My app does some lengthy processing on audio files, then at the conclusion of the process, displays a MessageDialog with a modal message and a few options (especially in the event of failure, they have options to retry/cancel).

The problem is that the MessageDialog is not behaving as it “should.”

First off, it creates a taskbar item for the dialog that’s separate from the taskbar item of the main app. That is definitely undesirable.

Second, the MessageDialog does not always get the focus. This seems to happen if the user switches to another program while my app is doing its processing and the messagedialog is raised in the background. When the user switches back to my app, the messagedialog does not have the focus, instead the focus goes to the main program window, which is frozen as it’s awaiting the result of the modal MessageDialog. In some cases, the MessageDialog is even displayed BEHIND the main program window in z-order, making it impossible to access since you can not move the main window out of the way in its waiting state.

To be clear, I’m using MessageDialog.ShowModal to display it.

Anyone know a way to get MessageDialogs to behave?