Create CSharp user control for VB6

 
  1. Install Microsoft Interop Forms Toolkit 2.0 which you can download from http://www.microsoft.com/downloads/details.aspx?FamilyId=934DE3C5-DC85-4065-9327-96801E57B81D&displaylang=en#filelist
  2. Create a VB6 Interop UserControl project (InteropUserControlLibrary) in VS2005 or VS2008. This project could be selected only after installing the Microsoft Interop Forms toolkit.

In this project, there is 1 file (InteropUserControl.vb) which you could add any windows control or controls built in csharp.

  1. Build the project and add the component in VB6 by Project->Components. Then you could drag the user control anywhere in VB6.

 

Install Interop Forms Toolkit 2.0

Installing the toolkit is fairly straightforward. Navigate to the Toolkit Download Site and, of the three downloads available, run the InteropFormsInstaller.msi file. In most cases, this is all you need to do. When you open the Visual Studio .NET IDE, you should find the new templates, VB6 Interop UserControl and VB6 Interop Form Library, available when you create a new VB.NET project. Under your Tools menu, you should also find a new wizard labeled "Generate InteropForm Wrapper Classes".

If the new wizard does not appear in your Tools menu, there may have been a problem installing it. Check Tools | Add-in Manager to make sure that this wizard is selected. If it is present and selected in the Add-in Manager, but still does not appear in your Tools menu, you can run the following command in your command line to reset it: Devenv /resetaddin Microsoft.InteropFormTools.InteropFormProxyGenerator.Connect.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值