Results 1 to 4 of 4

Thread: Resources in a .DLL and load them in an .EXE

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2000
    Posts
    27

    Exclamation

    I'm wondering if this is possible....

    Like creating an dll in vb...
    then add a resource file with some bmp's...
    then compile the dll...
    and then load from the exe the resources that
    are contained within the .dll

    thnx in advance...

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Yes!

    Right, the easiest way to get you started is:

    download this sample from MSDN (resfile.exe)

    http://support.microsoft.com/support.../Q194/4/09.ASP

    open the project

    add a projet (activeX dll)

    remove resfile.bas, and resfile.RES from the original project and add the to the activeXdll.

    Cut all the functions from resfile.bas and paste them into class1.

    this should leave just the 2 API declarations in resfile.bas

    Compile the dll as myRes.dll

    in the frmSaveRes add Dim obj As Object in the declaration section

    put Set obj = CreateObject("myres.class1") as the first line in form load

    sprinkle obj. around the rest of the form where required
    eg: obj.LoadPictureResource

    run

    test

    modify as required

    post reply to vb-world saying "thanks bud!"



    Mark
    -------------------

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2000
    Posts
    27
    Originally posted by Mark Sreeves
    post reply to vb-world saying "thanks bud!"
    well... i would.. if it worked.. but it doesn't

    it says "Active-X component can't create object"

    do you know a solution?


    [Edited by D!SiLLUSiON on 07-11-2000 at 11:25 AM]
    Life's hard, but the front of a train is harder

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Apr 2000
    Posts
    27
    ooooh I see it.. i have to rename the active-x dll project to myRes for it to work....

    so then again..

    Thanks Bud!
    Life's hard, but the front of a train is harder

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