类型的异常“System.Windows.Forms.AxHost + InvalidActiveXStateException”被扔 [英] Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown

查看:1718
本文介绍了类型的异常“System.Windows.Forms.AxHost + InvalidActiveXStateException”被扔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到关于我的简单的项目的问题,这是我的code:

I see problem about my simple project, this is my code:

if (axZKFPEngX1.InitEngine() == 0) {
    label1.Text = "Connected";
}
else {
    label1.Text = "Connection Failed";
}

我已经添加引用复合 AxInterop.ZKFP​​EngXControl Interop.ZKFP​​EngXControl

当我调试和明年我按一下按钮,显示屏显示警告:

When I debugging and next I click button, display warning appear:

InvalidActiveXStateException被处理。

InvalidActiveXStateException was handled.

异常类型的System.Windows.Forms.AxHost + InvalidActiveXStateException'被抛出**

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

如何解决问题呢? 谢谢。

How to solve problem? Thank you.

推荐答案

尝试调用 CreateControl()从组件第一。

这篇关于类型的异常“System.Windows.Forms.AxHost + InvalidActiveXStateException”被扔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆