Results 1 to 2 of 2

Thread: Making DLL's

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2002
    Posts
    31

    Making DLL's

    Hello everybody.

    I got some tip from Stuart Laidlaw earlier today about the easiest way to distribute patches etc. If I want to split up my program in DLL's. How can I then make the DLL's without VB checking for variables and different forms which I don't have in the DLL.
    (My exe-file is about 2 mb.)

    This may be a little confusing, but my main language is Norwegian soo it's a bit difficult to ekspress my self correctly.

  2. #2
    Helger
    Guest
    Just make sure you don't access any properties of a form outside the forms code.

    To get data from one dll to another you can pass variables as parameters between them, same as you can pass between modules or procedures within one app.

    Example for passing parameters in a one app situation:

    VB Code:
    1. Private Sub commandbutton1_click()
    2.  
    3. Call first
    4.  
    5. End Sub
    6.  
    7. Sub first()
    8. Dim strBla As String
    9. strBla = "Hello I made it to the other sub!"
    10.  
    11. Call second(strBla)
    12.  
    13. End Sub
    14.  
    15. Sub second(ByVal strMsgString As String)
    16.  
    17. MsgBox strMsgString
    18.  
    19. End Sub

    You can place both subs in one project or in two dlls. will work the same.

    hth,

    Helger

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