在C#中使用ocx文件 [英] Using an ocx file with C#
本文介绍了在C#中使用ocx文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须在C#Windows应用程序中使用ocx文件.我能够成功引用和访问ocx文件中定义的方法.但是:
Hi,
I have to use an ocx file with my C# Windows application. I am able to successfully refer and and access the methods defined in the ocx file. But:
- 当我尝试实例化对象时,例如
- When I am trying to instantiate the object like
objIRC = new IRCClass();
然后我编译时间错误是 类型" IRC.IRCClass没有定义构造函数"
then I compile time error is getting "The type ''IRC.IRCClass'' has no constructors defined"
你知道为什么会这样吗?
注意:我只有ocx文件.不知道.
谢谢你
Baji Jabbar:)
Do you have any idea why this is happening?
NB: I only have the ocx file. No idea about it.
Thanking you
Baji Jabbar :)
推荐答案
这仅表示无法实例化此类,但具有私有或受保护的构造函数.看看您在哪里下载了它,也许他们为如何使用它提供了指示.
祝你好运!
This simply means that this class cannot be instantiated but is has private or protected constructors. Have a look at where you downloaded it maybe they give pointers on how to use it.
Good luck!
这篇关于在C#中使用ocx文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文