本文介绍了穿线错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于当前线程不在单线程单元中,因此无法实例化ActiveX控件"d27cdb6e-ae6d-11cf-96b8-444553540000".
我该怎么解决
我单击表单1按钮时要添加两个表单,我要在form2中打开form2,我在运行Form2时添加了axShockwaveFlash1,此时我遇到此错误
ActiveX control ''d27cdb6e-ae6d-11cf-96b8-444553540000'' cannot be instantiated because the current thread is not in a single-threaded apartment.
how can i solve this
i add two forms when i click the form 1 button i want open the form2 in form2 i added axShockwaveFlash1 when i run the form2 that time i am getting the this error
推荐答案
var t = new Thread(MyThreadStartMethod);
t.SetApartmentState(ApartmentState.MTA);
t.Start();
祝你好运!
Good luck!
这篇关于穿线错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!