Results 1 to 8 of 8

Thread: create dll

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    3

    create dll

    Can VB create dll(dynamic link library) ??

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: create dll

    Moved from FAQ forum

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: create dll

    Yes it can!

  4. #4
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: create dll

    there are 2 types of dll's I know of: ActiveX and Win32.
    Which do you want?

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    3

    Re: create dll

    I want to create an activeX, how can I make it?
    Last edited by lenni0683; Jun 1st, 2006 at 08:42 PM.

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    3

    Re: create dll

    Quote Originally Posted by moeur
    there are 2 types of dll's I know of: ActiveX and Win32.
    Which do you want?
    The active X, how can I make it??
    Last edited by lenni0683; Jun 1st, 2006 at 08:45 PM.

  7. #7

  8. #8
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: create dll

    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)
    VB Code:
    1. Public Function AddValues(ByVal a As Double, ByVal b As Double) As Double
    2.     AddValues = a + b
    3. End Function
    - Now, go to File menu and add new standard exe project but do not close existing (project group will be created)
    - 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:
    1. Private Sub Command1_Click()
    2. Dim cTest As Test.clsTest
    3.  
    4.     Set cTest = New Test.clsTest
    5.     MsgBox cTest.AddValues(123, 123.765)
    6.     Set cTest = Nothing
    7.  
    8. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width