错误459此组件不支持此事件集(错误459) [英] Error 459 This component doesn't support this set of events (Error 459)

查看:115
本文介绍了错误459此组件不支持此事件集(错误459)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在C#中创建了一个活动的x控件.
我在64位win 7上构建它,它在我的pc上可以正常工作,但是当我在其他计算机(任何64位或32位
)上运行它时, ),则会出现上述错误.

I have created an active x control in C#.
I build it on 64bit win 7 it works fine in my p c, but when i run it on other computer(any 64bit or 32 bit
) it gives me the above error.

推荐答案

以下是发生此类错误的原因:
此组件不支持这组事件(错误459) [ ^ ]

它说:
-您尝试将WithEvents变量与不能用作指定事件集的事件源的组件一起使用.例如,您可能正在下沉某个对象的事件,然后创建另一个实现第一个对象的对象.尽管您可能认为可以从实现的对象中吸收事件,但情况并非如此.实现仅实现方法和属性的接口.

-您不能为没有源事件的组件接收事件.私有用户控件不支持WithEvents,因为引发ObjectEvent所需的类型信息在运行时不可用.

确保正确创建和使用您的ActiveX.它不是在对象中创建对象.简而言之,看起来像是您的ActiveX创建过程中遇到的问题.
Here is the reason of why such error happens:
This component doesn''t support this set of events (Error 459)[^]

It says:
- You tried to use a WithEvents variable with a component that can''t work as an event source for the specified set of events. For example, you may be sinking events of an object, then create another object that Implements the first object. Although you might think you could sink the events from the implemented object, that isn''t automatically the case. Implements only implements an interface for methods and properties.

- You can''t sink events for a component that doesn''t source events. WithEvents isn''t supported for Private UserControls, because the type-info needed to raise the ObjectEvent isn''t available at runtime.

Make sure your ActiveX is correctly created and used. It is not creating objects in objects. In short, looks like some issue in your ActiveX creation.


这篇关于错误459此组件不支持此事件集(错误459)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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