C# - ActiveX control without a form
参考 http://stackoverflow.com/questions/1531512/c-sharp-activex-control-without-a-form
Thread thread = new Thread((ThreadStart) delegate { _myActiveX = new MyActiveXType(); _myActiveX.CreateControl(); //more initialize work Application.Run(); }); thread.SetApartmentState(ApartmentState.STA); thread.IsBackground = true; thread.Start(); while (true) { if (_axgw != null) { //_myActiveX.Method; } }