axhost

ActiveX initialization: AxHost.State object

一笑奈何 提交于 2019-12-10 10:11:27
问题 I'm trying to embed a Unity3D-ActiveX control into a WPF-Form by using a WinFormsHost-Control. Actually it works well when setting the path in the property window of VS, but when setting it in my code file it does not load anything. This is a known issue of the control but i thought i can simply copy the creation code of the forms-designer and initialize it manually. When looking at the code of the initialization i noticed that there is no src property in the code, but the property is used in

Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown

丶灬走出姿态 提交于 2019-12-04 12:08:50
问题 I am getting an error in my simple project. This is my code: if (axZKFPEngX1.InitEngine() == 0) { label1.Text = "Connected"; } else { label1.Text = "Connection Failed"; } I already added reference composites AxInterop.ZKFPEngXControl and Interop.ZKFPEngXControl . While debugging, I click the button, and a warning appears: InvalidActiveXStateException was handled. "Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown"** 回答1: try to call CreateControl() from

Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown

做~自己de王妃 提交于 2019-12-03 06:45:37
I am getting an error in my simple project. This is my code: if (axZKFPEngX1.InitEngine() == 0) { label1.Text = "Connected"; } else { label1.Text = "Connection Failed"; } I already added reference composites AxInterop.ZKFPEngXControl and Interop.ZKFPEngXControl . While debugging, I click the button, and a warning appears: InvalidActiveXStateException was handled. "Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown"** try to call CreateControl() from your component first. The answer by Constantin is Fulfill your requirement but here I wanted to add one more