如何在VB6容器中嵌入C#COM控件? [英] How to embed a C# COM control in a VB6 container?

查看:125
本文介绍了如何在VB6容器中嵌入C#COM控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将C#COM控件嵌入VB6容器中.为此,我已经创建了一个COM控件,我注册了COM并转到VB6,并且能够使用和访问VB6.但是我想将COM控件嵌入到VB6容器中.我正在使用p/ivoke for user32.dll,并使用sendMessage()将处理程序发送到VB6.

I am trying to embed a C# COM control into a VB6 container. For that I already created a COM control I registered the COM and got to VB6 and I am able to use and access from VB6. But I want to embed the COM control into a VB6 container. I am using p/ivoke for user32.dll and using sendMessage() to send the handler to the VB6.

这是我第一次做所有这些事情,而且我得到的信息也很少.我是否做得正确以及执行该操作的确切流程感到非常困惑.这是非常重要和紧迫的.请帮助我.

I am doing all this for the first time and also I am getting very less information on this. I am very confused whether I am doing correct or not and what is the exact process to do that. It is very important and urgent. Please help me.

预先感谢

灵.

学生

推荐答案

Plchowdary,

Hi Plchowdary,

为什么要在VB6中调用C#代码?您要使用一些.Net功能吗?

Why do you want to call C# code in VB6? Is there some .Net functionality/feature which you want use?

您可以通过在.Net中创建COM可调用包装器来在VB6中调用.Net代码,以下链接详细介绍了该概念:

You can call .Net code in VB6 by creating COM callable wrappers in .Net, following link explains the concept in detail:

http://msdn.microsoft.com/en-us/magazine/cc163604.aspx

希望这会有所帮助.

Rajat.

如果您将任何有用的条目标记为有帮助的条目,并且该条目回答了您的问题,请在答案"链接中进行标记.

It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.


这篇关于如何在VB6容器中嵌入C#COM控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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