Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1449

COM Interop example. How to use .Net classes in VB6.

$
0
0


More than a few times now, I've seen people asking how to use .Net components in their VB6 applications. As it seems there is some small demand for it, I decided to show an example of how it is done. It is very simple and as such doesn't require that much explanation. The code itself should be easily understandable by anyone with a modicum of VB6/VB.Net experience.

Important Note

In order for the VB6 project in the attachment to work correctly, you MUST open the VB.Net project and compile it. The compiler will automatically register it with COM so it will be usable from VB6. The VB.Net project was created using Visual Studio 2019 so I recommend using that version of Visual Studio to compile it.

You can also look at this post I made a few years ago for another example of using COM Interop to access .Net classes from VB6. That example is even simpler than this one.

Any questions are welcomed.
Attached Files

Viewing all articles
Browse latest Browse all 1449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>