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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top