Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-12-11
5
Medium Priority
?
1,039 Views
Last Modified: 2012-05-04
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.
0
Comment
Question by:ryustar
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:nishikanth
ID: 9926485
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
 

Author Comment

by:ryustar
ID: 9926664
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
 
LVL 8

Accepted Solution

by:
nishikanth earned 60 total points
ID: 9927290
it's ok, i found what it was "tlbexp.exe" not "tlbimp.exe"  cheers
0
 

Author Comment

by:ryustar
ID: 9927451
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
 
LVL 8

Expert Comment

by:nishikanth
ID: 9934668
my pleasure. But you gave a B grade inspite the problem was resolved (:
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

876 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