P
Pooh
hi all,
i faced an error in my project:
"An unhandled exception of type
'System.Threading.ThreadStateException'
occurred in system.windows.forms.dll
Additional information: Could not instantiate ActiveX control
'648a5600-2c6e-101b-82b6-000000000014' because the current thread is
not in
a single-threaded apartment."
after i set as below:
Thread.CurrentThread.ApartmentState = ApartmentState.STA
other error occured:
Fail to set ApartmentState
i already put
<STAThread()> _
PublicSub Main()
for more detail about my error:
<STAThread()> _
PublicSub Main()
.....
Thread.CurrentThread.SetApartmentState(ApartmentSt ate.STA) -> error
(fail to set.....)
InitializeComponent()
.....
PrivateSub InitializeComponent()
....
Me.ScanSerial = New AxMSCommLib.AxMSComm
....
anyone know why?
please help...Thanks
i faced an error in my project:
"An unhandled exception of type
'System.Threading.ThreadStateException'
occurred in system.windows.forms.dll
Additional information: Could not instantiate ActiveX control
'648a5600-2c6e-101b-82b6-000000000014' because the current thread is
not in
a single-threaded apartment."
after i set as below:
Thread.CurrentThread.ApartmentState = ApartmentState.STA
other error occured:
Fail to set ApartmentState
i already put
<STAThread()> _
PublicSub Main()
for more detail about my error:
<STAThread()> _
PublicSub Main()
.....
Thread.CurrentThread.SetApartmentState(ApartmentSt ate.STA) -> error
(fail to set.....)
InitializeComponent()
.....
PrivateSub InitializeComponent()
....
Me.ScanSerial = New AxMSCommLib.AxMSComm
....
anyone know why?
please help...Thanks