I'm using the BackgroundWorker control in VB.NET 2005 to run some file IO operations. I kickoff the BackgroundWorker using the RunWorkerAsync method, then display a dialog form with a progress bar. This all works fine. In my RunWorkerCompleted method, I close the dialog form (with the progress bar) and open another dialog form displaying a message. The first line closes the first dialog form, but that dialog form does not close until the user clicks the OK button on the 2nd dialog form. Any suggestions? Here's the code in my RunWorkerCompleted method...
Note: dlgProgress was opened with a call to .ShowDialog
Code:
dlgProgress.Close()
dlgNotification.lblMessage.Text = "BLAH BLAH BLAH"
dlgNotification.ShowDialog()
Note: dlgProgress was opened with a call to .ShowDialog