Click here to Skip to main content
15,122,379 members
Articles / Operating Systems / Windows
Posted 24 Sep 2006


26 bookmarked

VB6 - C# Interop Form Toolkit

Rate me:
Please Sign up or sign in to vote.
4.57/5 (11 votes)
2 Oct 2006CPOL2 min read
Interop Form Toolkit was released few days ago. It allows an easy creation of mixed VB6/VB.NET application. One thing it is missing is the ability to do it in C#.
Sample Image - newproject.gif


After a long period of talking and expectation Interop Form Toolkit is finally released. I blogged about it few days ago here. If you have an existing VB6 application and are considering options to combine it with new .NET module, you definitely need to check it out.

After couple of hours playing with Interop Form Toolkit, one thing I could not understand is "why it supports VB.NET only?" So I decided to fix this injustice.

Two things should be replaced to make the toolkit work perfectly well with C#: Project template and Add-In for Wrapper objects creation. First of all, I created a new C# project template ("VB6 Interop Form Library C#") and a new item template ("C# Interop Form"). Now you will be able to create a new C# project from this template and add new forms with all needed references and attributes. The original Add-In does not bother even to check in which language the current project is written. It assumes that the only possible choice is VB.NET. Add-In creates a wrapper object and deals with public constructors, properties, methods and events. It will add to wrapper only public members marked with one of Interop Toolkit attributes (InteropFormProperty for example). New Add-In can replace the existing one. It can generate wrappers both in C# and VB.NET, based on project language. If you will invoke it in mixed VB.NET/C# solution, for each, project wrappers will be created in the correct language.


  • Other .NET languages except VB.NET and C# are still ignored.
  • I can only take credit mostly for translation work. Creators of the original Toolkit deserve a lot of thanks.
  • It is unsupported and definitely not a bullet proof tool. Please let me know about problems or feel free to fix the attached code.


I apologize for not creating the setup for this, but installation is very easy. First of all, you will need to download and install Interop Form Toolkit. Then, you need to copy template zip files into template directories (usually project template will go into ...\My Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual C#\Windows, and item template into ...\My Documents\Visual Studio 2005\Templates\ItemTemplates). And the last one: copy add-in files into Visual Studio 2005 Add-Ins directory (...\My Documents\Visual Studio 2005\Addins).


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Leon Langleyben
Web Developer
Israel Israel
Leon works as Chief Architect at SRL Group. He leads architectural design and development of various enterprise level projects.
You can meet him on user groups, conferences and forums dedicated to Architecture, ASP.NET, Team System etc. or join him for the next white water rafting adventure

Comments and Discussions

BugStrange floating point behaviour when accessing Single values is vb6 Pin
Jakob Schönfeld8-Sep-15 21:58
MemberJakob Schönfeld8-Sep-15 21:58 
QuestionCommercial License Pin
Dupron2-Apr-13 2:29
MemberDupron2-Apr-13 2:29 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey14-Mar-12 20:13
professionalManoj Kumar Choubey14-Mar-12 20:13 
SuggestionSolved: Problems with Visual Studio 2010, AddIn not loaded or/and Wrapper still in VB.Net Pin
arkimboldo2-Aug-11 3:19
Memberarkimboldo2-Aug-11 3:19 
GeneralProblems with Visual Studio 2008 and Interop Forms ToolKit 2.1 Pin
gcantarini13-Jul-10 4:52
Membergcantarini13-Jul-10 4:52 
QuestionHow to attach c# code as VB6 control Pin
ajovanov7-Jul-10 7:33
Memberajovanov7-Jul-10 7:33 
GeneralFYI - recompile the source for VS2010 Pin
mmacneill12310-Jun-10 4:46
Membermmacneill12310-Jun-10 4:46 
GeneralProblem creating interop form using VS2008 Pin
trpugh29-Aug-09 9:27
Membertrpugh29-Aug-09 9:27 
QuestionDoes it work on 2008? Pin
devnet2478-May-09 6:26
Memberdevnet2478-May-09 6:26 
AnswerRe: Does it work on 2008? Pin
Eddy Vluggen21-Aug-09 9:43
professionalEddy Vluggen21-Aug-09 9:43 
GeneralRe: Does it work on 2008? Pin
mmacneill12326-Jan-10 6:55
Membermmacneill12326-Jan-10 6:55 
GeneralRe: Does it work on 2008? Pin
Jeff Roe27-Jan-10 14:21
MemberJeff Roe27-Jan-10 14:21 
GeneralRe: Does it work on 2008? [modified] Pin
Member 79748688-Jun-11 4:08
MemberMember 79748688-Jun-11 4:08 
GeneralVS 2008 interop 2.0 Pin
johnp321021-Apr-09 10:58
Memberjohnp321021-Apr-09 10:58 
GeneralNever mind misunderstood something Pin
johnp321021-Apr-09 12:33
Memberjohnp321021-Apr-09 12:33 
QuestionGenerate Wrapper Error Pin
Member 185960731-Mar-09 19:12
MemberMember 185960731-Mar-09 19:12 
QuestionIs it a Interop UserControl version? Pin
hainanpc10-Aug-08 7:11
Memberhainanpc10-Aug-08 7:11 
General"lost" the InteropForm Wrapper C# Class Generator Pin
JohnBaima13-Feb-08 12:10
MemberJohnBaima13-Feb-08 12:10 
GeneralRe: "lost" the InteropForm Wrapper C# Class Generator Pin
JohnBaima13-Feb-08 12:22
MemberJohnBaima13-Feb-08 12:22 
GeneralRe: "lost" the InteropForm Wrapper C# Class Generator Pin
scrapetoe28-Apr-08 4:01
Memberscrapetoe28-Apr-08 4:01 
GeneralExpose custom properties and methods to host app Pin
Edward Lane10-Sep-07 6:59
MemberEdward Lane10-Sep-07 6:59 
GeneralRe: Expose custom properties and methods to host app Pin
Edward Lane13-Sep-07 6:34
MemberEdward Lane13-Sep-07 6:34 
GeneralRe: Expose custom properties and methods to host app Pin
Fessen11-Feb-09 22:52
MemberFessen11-Feb-09 22:52 
AnswerRe: Expose custom properties and methods to host app Pin
MyDevPartners17-Feb-12 10:38
MemberMyDevPartners17-Feb-12 10:38 
GeneralError while loading adddin Pin
Amit_bad9-Jul-07 22:35
MemberAmit_bad9-Jul-07 22:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.