Why is a C#/.NET message box not modal?
Accidentally, if the message box goes behind our main UI, then the main UI doesn't respond, until we click OK (on our message box).
Is there a workaround other than creating a custom message box?
Why is a C#/.NET message box not modal?
Accidentally, if the message box goes behind our main UI, then the main UI doesn't respond, until we click OK (on our message box).
Is there a workaround other than creating a custom message box?
You need to assign the MessageBox owner property to the main UI window (look at the 3rd constructor).
Make the message box appear in the main thread, if your form has been created from it:
This is a simple C# new Windows Forms application:
As Dusty states in his answer, a message box is a modal dialog. Specify the 'owner' property. In this example, the owner is denoted by the keyword 'this'.