VS 2003 to VS 2005 conversion issues - threading.

G

Guest

I have a windows forms solution created with VS 2003 (VB). I have used the
VS conversion wizard to convert to VS 2005. Now when the program gets to the
following code I get error message "ActiveX control
'8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the
current thread is not in a single-threaded apartment." I have added the
<STAThread> attribute to the form initialize sub, recompiled successfully,
but still get the error.

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.

InitializeComponent()

End Sub
 

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

Top