MessageBox yet let the program continue on without waiting?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Newbie Question
Is there a way to use Message.Show so that it will allow the program to
continue processing without waiting for a user to click OK?
 
JM,

No, the MessageBox is a modal dialog, and requires that the interaction
continue.

You ^could^ create a new thread, run a message loop on that thread, and
then show the messagebox, and your original thread will not block, but once
that completes, what do you expect the program to do?
 
Thanks for the help. It's much appreciated. I'll just let things hang until
the user clicks OK.

Nicholas Paldino said:
JM,

No, the MessageBox is a modal dialog, and requires that the interaction
continue.

You ^could^ create a new thread, run a message loop on that thread, and
then show the messagebox, and your original thread will not block, but once
that completes, what do you expect the program to do?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

JM said:
Newbie Question
Is there a way to use Message.Show so that it will allow the program to
continue processing without waiting for a user to click OK?
 
What do you want the MessageBox to show, that the program should be
able to continue processing meanwhile?

If it's an indication of progress, I solved this problem using a
subclass of Form that shows text to the user, and allows the
application to post text to the form as things progress. Sort of a like
a ProgressBar with no bar. :)

This form I created can have a Cancel button, but no OK button, because
OK doesn't mean anything in that context.

So... what are you trying to do? Maybe there's a different control that
you don't know about that is suited to your purpose.
 
Back
Top