Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 08-05-2009
Join Date: Apr 2009
Posts: 102
Create ActiveX dll with Visual Basic


I am developing an Third party application where i need to create an ActiveX dll file using Visual basic, but i don't know how to start with the same and i find that this is possible but not difficult so please help me how to do it.

thanks for your help.
Reply With Quote
Old 08-05-2009
Join Date: Oct 2008
Posts: 167
Re: Create ActiveX dll with Visual Basic

we need to assign the class in the Dll to an object variable. So add this code to the general declarations section of your forms code module:

Dim X As CSomeDll
'CSomeDll' is the name of the class in the DLL that has the method we want to use. We named it this in step 2 of creating the Dll.

Now add this code to Command1:

Private Sub Command1_Click()

Set X = New CSomeDll '<---Assigns an object reference
Text1.Text = X.ReverseString(Text1)
Set X = Nothing '<--------Release resources to the object

End Sub
Reply With Quote
Old 08-05-2009
Join Date: Dec 2008
Posts: 202
Re: Create ActiveX dll with Visual Basic

Here I will provide you the details about how to create the ActiveX dll file.

creating the dll file.
  1. Start VB window it should be Visual studio 2005 and select ActiveX Dll for the project type.
  2. In the properties window for the Class (the only code window in the project), Provide any suitable name to your project such as 'createDll'. but the project name should be similar to form name.
  3. Browse Project from the menu, select Project1 Properties from the drop down list, change the project name to 'createDll', and provide the suitable Project Description to 'This is a useless DLL'. This description will Important from all aspects.
  4. You need to add a method (Function) to the class. You may take a any string as its parameter and may returns it spelled backwards. there will be no issues as this function will be already exists in VB, this will be just as for your example.

    Option Explicit
    Public Function ReverseString(ByRef SomeString As String) As String
    ReverseString = StrReverse(SomeString)
    End Function
  5. You are not ready to compile it by selecting File, in the drop-down list you will be allow to select Make SomeDll.dll and choose a safe place to save it.
  6. Save the project wherever you like and close it.
and here your Dll is ready for a client application to use it.
Reply With Quote

  TechArena Community > Software > Software Development
Tags: , ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Create ActiveX dll with Visual Basic"
Thread Thread Starter Forum Replies Last Post
How to create installation package of application in visual basic 6.0 Badrinath18 Software Development 5 02-07-2011 07:28 PM
How to create a Smart Tag DLL in Visual Basic? warehouse peon Software Development 5 27-02-2010 05:04 AM
How to create Windows DLL with Visual Basic? Flaco Software Development 4 27-02-2010 04:39 AM
How to Create ActiveX Controls in Visual Basic 6 geokilla Software Development 3 30-09-2009 03:36 PM
How to create an .exe file in visual basic kasha_i Software Development 3 21-04-2009 11:53 PM

All times are GMT +5.5. The time now is 03:33 PM.