5,137,506 members and growing! (13,108 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » .NET Framework » General     Intermediate

VB6 - C# Interop Form Toolkit

By Leon Langleyben

Interop Form Toolkit was released few days ago. It allows an easy creation of mixed VB6/VB.NET application. One thig it missing is ability to do it in C#.
Windows, .NET, Visual Studio, Dev

Posted: 24 Sep 2006
Updated: 2 Oct 2006
Views: 24,753
Announcements



Search    
Advanced Search
Sitemap
5 votes for this Article.
Popularity: 2.51 Rating: 3.59 out of 5
1 vote, 20.0%
1
0 votes, 0.0%
2
1 vote, 20.0%
3
0 votes, 0.0%
4
3 votes, 60.0%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Sample Image - newproject.gif

Introduction

After a long period of talking and expectation Interop Form Toolkit is finally released. I bloged about it few days ago here. If you have existing VB6 application and considering options to combine it with new .NET module, you defenitely 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 new C# project template ("VB6 Interop Form Library C#") and new item template ("C# Interop Form"). Now you will be able to create new C# project from this template and add new forms with all needed references and attributes. Original Add-In do not bother even to check in which language current project written. It asumes that that the only possible choice is VB.NET. Add-In create wrapper object and deals with public constructors, properties, methods and events. It will add to wraper only public members marked with one of Interop Toolkit attributes (InteropFormProperty for example). New Add-In can replace 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 correct language. 

Notes

  • Other .NET languages except VB.NET and C# are still ignored.
  • I can only take mostly for translation work. Creators of 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 attached code

Installation

I am apologize for not creating setup for this, but installation is very easy. First of all you will need to download and install Interop Form Toolkit. Now, 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 vs2005 Add-Ins directory (...\My Documents\Visual Studio 2005\Addins).

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Leon Langleyben


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
Occupation: Web Developer
Location: Israel Israel

Other popular .NET Framework articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 25 of 29 (Total in Forum: 29) (Refresh)FirstPrevNext
Subject  Author Date 
General"lost" the InteropForm Wrapper C# Class GeneratormemberJohnBaima12:10 13 Feb '08  
GeneralRe: "lost" the InteropForm Wrapper C# Class GeneratormemberJohnBaima12:22 13 Feb '08  
GeneralRe: "lost" the InteropForm Wrapper C# Class Generatormemberscrapetoe4:01 28 Apr '08  
GeneralExpose custom properties and methods to host appmemberEdward Lane6:59 10 Sep '07  
GeneralRe: Expose custom properties and methods to host appmemberEdward Lane6:34 13 Sep '07  
GeneralError while loading adddinmemberAmit_bad22:35 9 Jul '07  
GeneralRe: Error while loading adddinmemberscrapetoe4:03 28 Apr '08  
GeneralRe: Error while loading adddinmemberscrapetoe5:13 28 Apr '08  
QuestionV2.0 Update?memberT. Brian Hughes5:41 25 May '07  
AnswerRe: V2.0 Update?memberBruce Armstrong20:13 12 Jul '07  
AnswerRe: V2.0 Update?memberBruce Armstrong20:34 12 Jul '07  
Generalsample code for my refmembermbalajhee5:27 23 Apr '07  
GeneralWhat about TAB???????memberhav29a3:54 19 Feb '07  
GeneralRe: What about TAB???????memberCosmicArts10:11 8 Aug '07  
Questioncan only add one formmemberclovisA1235:14 2 Feb '07  
GeneralHow to use with VS6 C++memberJoe Calabrese7:25 5 Jan '07  
General.Net user controls in Vb6memberKodici3:02 5 Jan '07  
GeneralHow to open c# form in MDIChild in VB6 ? [modified]memberlake115:23 7 Dec '06  
GeneralNew to .Net not sure of what the install entails.memberSkater Dude11:40 25 Oct '06  
GeneralRe: New to .Net not sure of what the install entails.memberLeon Langleyben22:36 25 Oct '06  
GeneralRe: New to .Net not sure of what the install entails.membergrxie11:23 10 Jul '07  
GeneralCall from vb6 creates a form not in project.memberUnderWing10:20 28 Sep '06  
GeneralRe: Call from vb6 creates a form not in project.memberLeon Langleyben8:19 3 Oct '06  
GeneralIt keeps generating wrappers in VB when using C#membermarioavc10:05 25 Sep '06  
AnswerRe: It keeps generating wrappers in VB when using C#memberLeon Langleyben12:42 25 Sep '06  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 2 Oct 2006
Editor:
Copyright 2006 by Leon Langleyben
Everything else Copyright © CodeProject, 1999-2008
Web19 | Advertise on the Code Project