Solved

Adding .NET dll as reference to VB6

Posted on 2004-10-05
3
334 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now