WRH,
I wouldn't create the bitmap in the declaration. Rather, try it when
the form loads, after the window and the webbrowser control is created.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"WRH" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello
> I have a Form where I display DirectX Direct3D stuff on one panel
> and a WebBrowser in another. Compiles & runs fine until I add
> one line...
>
> private Bitmap bmpForm= new Bitmap(typeof(Form1), "frame5.bmp");
>
> Compiles ok, but does not run... I get a System Thread Exception
> where I instantiate the web browser...
> "Could not instantiate ActiveX because the current thread is
> not in a single-threaded apartment".
>
> Does loading a Bitmap change the threading model? What should
> I do to get my bitmap?
>
>