create dll

tirso

Active member
Joined
Nov 15, 2006
Messages
31
Programming Experience
1-3
Hi to all, does anyone could help me on how to create a .dll in visual basic 2005 express edition. Is there any site or resources can teach me step by step or even a sample source code. any suggestion is greatly appreciated

tirso​
 
Just create a new Class Library project and write your classes.
 
Thanks for the reply, I am new in VB2005 express edition. I don't know where can I start. Furthere more if I use build it will automatically create .DLL? how to call this?

Tirso
 
Build will create dll file for Class Library project, yes.

This dll you can access from other project by adding reference to it, Project menu > Add Reference.. then Browse to find that dll file.

For example if your class lib was TestClassLibrary and you created a class inside this TestClass, in other project you then create a new instance of this:
VB.NET:
Dim x As New TestClassLibrary.TestClass

You could also import that namespace like this:
VB.NET:
Imports TestClassLibrary
And use the class without specifically qualifying the namespace so (as long as there is no name conflict between other namespaces):
VB.NET:
Dim x As New TestClass
 
Back
Top