Home All Groups Group Topic Archive Search About

Visio Activex Failing when launching using thread - MVP Please - Very important

Author
6 Jul 2006 4:35 AM
Shahzad Godil
VB.net solution with this issue
http://dotsystem.biz/Files/Shahzad/ThreadCheck.zip
Required Visio 2003.

I have one remoting server which is launch Visio activex based application
on remote request.

I have this code to launch my application.  But it is giving "Class Not
registered" error in InitializeComponent of form which has ActiveX control.
My application is working perfectly when I am launching this without any
thread.

I also tried Appartment.STA to MTA but it is also failing because activex
control doesnt support mta.


Please suggest.

Thanks
Shahzad Godil

Public Sub LaunchThread()

' Create a thread. Then run the LaunchForm method on the thread.

Dim MyThread As System.Threading.Thread

MyThread = New System.Threading.Thread(AddressOf LaunchForm)

MyThread.ApartmentState = Threading.ApartmentState.STA

MyThread.Start()

End Sub

AddThis Social Bookmark Button