Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Adding .NET dll as reference to VB6

Posted on 2004-10-05
3
Medium Priority
?
349 Views
Last Modified: 2010-04-23
I have a VB6 program and would like to use methods of a DLL in this program.  But this is .NET DLL.
Can I add a .NET dll as reference to my VB6 program? If yes, can you please guide me how to do it.
Thanks
0
Comment
Question by:Vasi04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 2000 total points
ID: 12235022
Yes you can
When creating the DLL in .NET set the property of the project "Register for COM InterOp" to True
it is a checkbox in the property pages

Then you can access it in VB6 by adding a reference to it as you do with other DLLs

For detailed info see

http://www.buygold.net/v07n04/v07n04.html
0
 

Author Comment

by:Vasi04
ID: 12235189
cool..
After I have referenced .net dll in my vb6, can I use its methods/funtions?
Or do it need to wirte any code within my vb6 to access the functionalities of referenced .net dll
0
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 12245381
You'll need to create an object of the class in the DLL and call the methods of course...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question