Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VB6 with a .NET Library

I have an application written in VB6, and I need to use a library written in .NET. Is there any way to use the library on my application?

Thanks

like image 996
Feyyaz Avatar asked Jun 16 '10 13:06

Feyyaz


People also ask

Is VB.NET compatible with VB6?

Visual Basic.NET can be installed on a computer that has Visual Basic 6 installed, and both can run at the same time. Applications written in both VB6 and VB.NET can also be installed and executed on the same computer. Furthermore, components written in VB6 can be used in VB.NET projects.

Is VB6 still in use?

The Visual Basic 6.0 IDE is no longer supported as of April 8, 2008.

Is VB6 a legacy?

Legacy development and supportAll versions of the Visual Basic development environment from 1.0 to 6.0 were retired by Microsoft by 2008, and are therefore no longer supported.


1 Answers

It depends. Do you have control over the .NET library?

If so, you can modify your library so that it can be registered as a COM component. You can then utilize the COM component from VB6.

You can follow this CodeProject tutorial for step by step directions on creating a COM component in .NET, registering it, and then calling it from VB6:

Exposing .NET Components to COM

like image 91
Justin Niessner Avatar answered Sep 27 '22 21:09

Justin Niessner