MessageBox.Show behaving as non-modal

D

Drew Lettington

I'm making a simple call to display error messages in a
MessageBox from a Windows form and the MessageBox is not
behaving in a modal fashion. My modal form displays, the
user clicks a button and error handling code calls
MessageBox.Show. The user is then allowed to click the
button on my form again before clicking OK on the
MessageBox.

Any ideas why the MessageBox is not behaving modally?

I'm using Visual C# 2003. Here's the MessageBox call:

public static void DisplayMyError(string myError,
MessageBoxButtons buttons, MessageBoxIcon icon)
{
MessageBox.Show(myError, "My
Title",
buttons, icon);
}
 
D

Drew Lettington

The is no explicit multi-threading. I have a dll,
loaded into Office via COM extensibility. That dll opens
a modal Windows form and the modal form displays an error
message in a standard MessageBox.
 
J

js

I had the same problem. I'm sure I'm using single thread.

Anybody has the answer?



-jason
 
M

Mark

Did you ever figure this out? What if you pass in the owner parameter?
Does that fix it?

m
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top