how to call DLL

rrrprogrammer

Member
Joined
Aug 15, 2008
Messages
7
Programming Experience
10+
In VB6, I used CreateObject function to invoke a DLL application

I wrote a DLL application in VB.NET. How can I invoke DLL application in VB.NET??


In VB 6
HelloWorld.dll

dim objHelloWorld as object
objHelloWorld= CreateObject("HelloWorld.DisplayForm")
 
.Net dll libraries aren't COM libraries as everything VB6, .Net deliberately moved away from COM. With .Net you reference the local dll assembly and use its objects like any other class object in .Net.
VB.NET:
Dim c As New ClassLibrary1.Class1
c.Method()
Class libraries are not application projects that are executable by them selves, so I don't understand your wording exactly.
 
You use the Add Reference dialog, access this
  • from Project menu,
  • or with context menu in Solution Explorer,
  • or from References page in Project properties.
 
Back
Top