VB.NET in VB6

T

Thomas Kehl

Hello

I have a application written in VB6. Now, Is it possible to use a VB.NET-DLL
in my VB6-Application? - If this works, I can develop new modules in VB.NET
and use this in my app and migrat step by step to VB.NET.

Thanks for your tipps!

Thomas
 
M

m.posseth

Yes you can ,,,

Create a COM interop component ,,,, i have done this manny times

some tips :

1. you must have a sub new in your to COM exposed class ( the
constructor must be without parameters )
Public Sub New()

MyBase.New()

End Sub

2. provide your own id`s ClassId , InterfaceId and EventsId

register the dll with Regasm instead of regsvr


regards

Michel Posseth [MCP]
 
A

Armin Zingler

Thomas Kehl said:
I have a application written in VB6. Now, Is it possible to use a
VB.NET-DLL in my VB6-Application? - If this works, I can develop new
modules in VB.NET and use this in my app and migrat step by step to
VB.NET.

One hint, if you will be using COM and VB 2003 and also have VB 2005
installed:
http://blogs.msdn.com/jmstall/archive/2005/12/05/VS2003_crashes_with_2005.aspx

Might prevent you from looking for the solution hours and hours (like I
did).



Armin
 
H

Herfried K. Wagner [MVP]

Thomas Kehl said:
I have a application written in VB6. Now, Is it possible to use a
VB.NET-DLL in my VB6-Application? - If this works, I can develop new
modules in VB.NET and use this in my app and migrat step by step to
VB.NET.

Yes, that's possible:

..NET Framework Developer's Guide -- Exposing .NET Framework Components to
COM
<URL:http://msdn.microsoft.com/library/en-us/cpguide/html/cpconexposingnetframeworkcomponentstocom.asp>

Visual Basic Language Concepts -- COM Interop
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconCOMInteroperability.asp>

<URL:http://msdn.microsoft.com/vbrun/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top