我有一个能够通过WebBrowser对象打印HTML的打印机类.我希望能够从控制台应用程序打印,但是当我的打印机类尝试创建WebBrowser对象时出现错误:
WebBrowser browser = new WebBrowser();
错误:
ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot 
be instantiated because the current thread is not in a 
single-threaded apartment.  
我尝试将对System.Windows.Forms的引用添加到我的控制台应用程序中,但这不起作用.我对这里发生的事情一无所知,但我很感激你的帮助.