Solved

Adding .NET dll as reference to VB6

Posted on 2004-10-05
3
345 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 500 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

623 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