Message box cannot pop-up as a modal in seperate thread? Pls help.

  • Thread starter Thread starter sleepyant
  • Start date Start date
S

sleepyant

Hi. I try to call msgbox("somehting") inside a sub which is run in a
different background thread. The problem is the message box is not pop-up as
a modal form, so whenever there is a message box pop-up, the 'Main' form is
still active and clickable.

Is there a way to solve this? Please advice. Thanks.
 
Not an expert but looks like a design problem. IMO user interaction should
be limited to a single thread.

The other option would be to have the background thread asking the UI thread
to raise the msgbox instead of directly much like when you have a background
thread that needs to update a the UI form...

Try for example http://weblogs.asp.net/justin_rogers/articles/126345.aspx

Patrice
 
Back
Top