Results 1 to 5 of 5

Thread: Error getting stuff to work with resource file

  1. #1

    Thread Starter
    Frenzied Member Devion's Avatar
    Join Date
    Sep 2000
    Location
    The Netherlands
    Posts
    1,049

    Exclamation

    I'm using a resource file to supply my buttons and formbackgrounds with an image.

    I could do it the hard way and hardcode each button with the image which creates a way to big file :/ or use a resource file..

    But now I get this nice error that it can't find the resource ID...

    I created 2 custom id's.. (2 JPG files) now called 101 and 102 (I first called 'm BackGRND and Button but that didn't help)

    I use this code to call 'm:
    frmMain.Picture = LoadResPicture(101, vbResBitmap)

    But thus it came with a error that it can't find "101"!

    Can someone give me the clue to get this working?


  2. #2
    Lively Member
    Join Date
    Sep 1999
    Location
    Liverpool, UK
    Posts
    64
    I don't know how you extract a jpg from a resource file, I'm sure someone here does though.

    However, a quick fix for your problem would be to save your jpg's as bitmaps and put them in the resource file instead. Then use the exact same code to set the picture on the button. That'll work..

  3. #3

    Thread Starter
    Frenzied Member Devion's Avatar
    Join Date
    Sep 2000
    Location
    The Netherlands
    Posts
    1,049
    And would take about 800Kb more room.

    No thanx.

  4. #4
    Lively Member
    Join Date
    Sep 1999
    Location
    Liverpool, UK
    Posts
    64

  5. #5

    Thread Starter
    Frenzied Member Devion's Avatar
    Join Date
    Sep 2000
    Location
    The Netherlands
    Posts
    1,049
    Thnx

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