I have a new thread that opens up when I hit a query button. I'm not sure I am opening the "Form2" correctly because I do not see it when running tests however, the debug doesn't pick anything up. Here is the code:

vb Code:
  1. Public Sub ShowProgBar()
  2.         Dim form2PB As Form = mywindowsapp1.Form2
  3.         form2PB.Show()
  4. End Sub
  5.  
  6. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  7.  
  8.         'validate the text fields
  9.         'some code that does some stuff.....
  10.  
  11.         Dim thread1 As System.Threading.Thread
  12.         thread1 = New System.Threading.Thread(AddressOf ShowProgBar)
  13.         thread1.Start()
  14.  
  15.         'more code that does some stuff
  16.         'processes running while progress bar should be displaying
  17.  
  18.         MessageBox.Show("Processes Complete")
  19.  
  20.         Application.Exit()
  21.         'this is also where the progress bar thread should terminate
  22. End Sub

I am wondering why I am not seeing Form2 (containing my progressbar) during this.

Thanks