How to run a form in it's own thread in vb.net 2005

  • Thread starter Thread starter 1388-2/HB
  • Start date Start date
1

1388-2/HB

Public Sub ThreadStartPoint

Application.Run(frmSomeForm)

End Sub

This 2003 code no longer works. What's the new model for accomplishing this
task in vb.net 2005?
 
Public Sub ThreadStartPoint
Application.Run(frmSomeForm)

End Sub

This 2003 code no longer works. What's the new model for accomplishing this
task in vb.net 2005?


Have you set the thread's ApartmentState property to STA?


Mattias
 
This was just a stupid mistake

"Application.Run"

was by default referencing My.Application.Run

I just needed to specify System.Windows.Forms.Application.Run. I was
referencing the Run method of the wrong Application object.
 
Back
Top