Can VB create dll(dynamic link library) ??
Printable View
Can VB create dll(dynamic link library) ??
Moved from FAQ forum
Yes it can!
there are 2 types of dll's I know of: ActiveX and Win32.
Which do you want?
I want to create an activeX, how can I make it?
The active X, how can I make it??Quote:
Originally Posted by moeur
Open VB, select project type "ActiveX DLL" and do what you want...
Try this very quick sample:
- open new project and select ActiveX Dll
- rename new dll project to Test
- rename class module to clsTest
- in the class module add the following function (you may modify it if you want)
- Now, go to File menu and add new standard exe project but do not close existing (project group will be created)VB Code:
Public Function AddValues(ByVal a As Double, ByVal b As Double) As Double AddValues = a + b End Function
- go to project references and set references to Test (it will be about 4-5 item in the list)
- add command button to your form
- add the following code to your form
- set stamdard project to be startup (by right clicking on it and selecting appropriate option)
- run it and hit the button
VB Code:
Private Sub Command1_Click() Dim cTest As Test.clsTest Set cTest = New Test.clsTest MsgBox cTest.AddValues(123, 123.765) Set cTest = Nothing End Sub