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

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.
 
P

Patrice

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
 

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