代码改变世界

当前线程不在单线程单元中,因此无法实例化 ActiveX 控件“8856f961-340a-11d0-a96b-00c04fd705a2”

2013-07-05 09:03 by awenwang, 1592 阅读, 0 推荐, 收藏,
摘要:使用webBrowser截图时出现这样一个错误:查找了下,大部分人说的解决方法如下:System.Threading.ThreadStart start =new System.Threading.ThreadStart(download); System.Threading.Thread th =new System.Threading.Thread(start); th.ApartmentState = System.Threading.ApartmentState.STA;//关键或者[STAThread]staticvoid Main(string[] args){}而我最后使用的.. 阅读全文