Apr 10, 2010
I am trying to create a background worker that will spawn a dialog, while a long event is occurring. For example, when the main thread in trying to connect connect to a db and update a large amount of records, I would like to have the background worker spawn a dialog that advises the user to "Please Wait"
View 6 Replies
Here is what I have so far
1. I create a background worker using the drag and drop
2. Before the event that taking a long time starts I call:
BackgroundWorker1.WorkerReportsProgress = True
3. This is the events for the bgworker, all of which was enabled in the form designer:
Private Delegate Sub delCreateNewForm()
Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Dim d As New delCreateNewForm(AddressOf CreateNewForm)
4. When the long activity is completed I call this:
Everything seems to work fine, except that the newly spawned dialog in no responsive and appears to be frozen, until its closed by the Progress Changed event.