Alex,
Do you have the [STAThread] attribute applied to the Main method of your
program? This assumes you are trying to create the web browser control in
the main UI thread.
If not, are you trying to create this in a thread other than the main UI
thread? If so, why? It needs to be a single threaded apartment thread in
order to properly run.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"alexmaster_2004" <al************@discussions.microsoft.com> wrote in
message news:78**********************************@microsof t.com...
Hi There
Consider the following error that I receive when trying to instantiate the
web browser control:
An unhanded exception of type 'System.Threading.ThreadStateException'
occurred in system.windows.forms.dll
Additional information: Could not instantiate ActiveX control
'8856f961-340a-11d0-a96b-00c04fd705a2' because the current thread is not
in
a single-threaded apartment.
Thanks