
07-10-2012, 08:59 AM
|
 |
Fabulous Florist
Forum Leader * Guru *
|
|
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,419
|
|
gg67, please don't respond to .NET questions with VB6 code. There's a legacy forum for VB6 discussion.
fartil3:
A thread can only do one thing at a time. Multiple forms can appear to be doing multiple things on the same thread because of the "message pump", a mechanism they use to receive input events. When you display a dialog, the calling form's message pump is suspended. That's why displaying a dialog "disables" the parent form. So I imagine your code looks like this:
Code:
Dim waitDialog As New YourWaitDialog()
waitDialog.ShowDialog()
DoStuff()
What you'd /like/ is for DoStuff() to happen while the dialog is displayed. Unfortunately that's impossible with a single thread. You need to look into using something like the BackgroundWorker component to do your work on another thread while the dialog is displayed.
|
|