Results 1 to 8 of 8

Thread: Simple Question (Maybe)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    8

    Exclamation

    I have a block of code that I use alot. I'm looking for a way to access the block of code without retyping it. I've tried to compile it into a DLL, but get an error (can not find entery piont to dll) when i try to access it. If you have any ideas please help me out.
    Thank you

  2. #2
    Guest

    Thumbs up Post the code

    No idea without seeing what you are trying to achieve, do you have properties etc defined for the dll

  3. #3
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184
    If its a collection of code in a Module, Public Functions and the like, why not save it off as a Module and include it in any Projects that might use it.

  4. #4
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181

    Talking Not too hard

    Just go to http://www.chez.com/scribe

    there is a very small sample About making DLLs. It's very easy. And it WORKS!
    Sanity is a full time job

    Puh das war harter Stoff!

  5. #5
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181

    Complete URL


  6. #6
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ....

    Yes, Steven has put it almost right.

    Almost, because you still can make a dll from it. Start a new ActiveX dll project, add your code modules to it and compile it into a dll file. I think the URLs have given you that stuff.

    The advantage of a dll over a re-usable code module is a matter of discussion. But essentially you can distribute a dll easily, not a code module. For e.g. if you want to access the same code in more than one project and if it is in a code module, keeping it up to date will be difficult. With a dll, you can improve the functionality and distribute the latest version without much trouble.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  7. #7
    Guest
    If the code is going to be shared throughout different Application's, it's a good idea to make it into a DLL. However, if it's just some common code you use in all of your App's (Registry API's for example) then you can put it into a module and store it in the modules' template directory. That way, when you waant to add a new module to your App, you can select your "common" module because it contains all of your common code.

  8. #8
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ....

    Thanks Megatron. You have put it just right. The idea of putting the module in the Templates folder is also nice. I use this in case of my Word files, but never thought of using it for VB.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

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