将WinForms UserControl公开为ActiveX控件 [英] Expose a WinForms UserControl as an ActiveX control

查看:130
本文介绍了将WinForms UserControl公开为ActiveX控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将用C#编写的WinForms UserControl公开为ActiveX控件?我的目标是从其他语言(例如VB6或Delphi)中使用此UserControl。

How do you expose an WinForms UserControl written in C# as an ActiveX control? My goal is to then use this UserControl from other languages such as VB6 or Delphi.

推荐答案

解决方案是使用Interop工具包,请参见 http://msdn.microsoft.com/en-us/vbasic/bb419144 http://www.codeproject.com/KB/vb-interop/ VB6InteropToolkit2.aspx

The solution is to use the Interop Toolkit, see http://msdn.microsoft.com/en-us/vbasic/bb419144 and http://www.codeproject.com/KB/vb-interop/VB6InteropToolkit2.aspx.

这篇关于将WinForms UserControl公开为ActiveX控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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