How can I use a VB.net Dll in VB6?

I have written a dll with VB.NET, But I wanna use it in VB6.
how can i do ? My English is not good enough, please don't mind. Thanks a lot.
ryustarAsked:
Who is Participating?
 
nishikanthConnect With a Mentor Commented:
it's ok, i found what it was "tlbexp.exe" not "tlbimp.exe"  cheers
0
 
nishikanthCommented:
It's quite simple but you will end up with 2 dlls(COM referencer, .Net DLL)
Use the Run command in the Start Menu:


Code:
--------------------------------------------------------------------------------
"C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\tlbimp.exe" "C:\MyProject\Bin\MyProject.dll"

--------------------------------------------------------------------------------


This will create MyProject.tlb which can be used in VB 5/6 and any other COM enabled languages(Note the .Net framework is still required to use the dll)
0
 
ryustarAuthor Commented:
But , when I do as your said. This error occurs. can you tell me why?

"TlbImp error: The input file 'E:\My Project\VB.net\DllTeset\bin\DllTeset.dll' is not a valid type library"
0
 
ryustarAuthor Commented:
thanks for your help, nishikanth,  I have resolved that problem.
this is my first question in this forum. sincerely send my thanks to you.
0
 
nishikanthCommented:
my pleasure. But you gave a B grade inspite the problem was resolved (:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.