Results 1 to 4 of 4

Thread: Best way to store/retrieve graphics...

  1. #1

    Thread Starter
    Lively Member bgalm's Avatar
    Join Date
    Jan 1999
    Posts
    65

    Question

    I have an app that access graphics from a few different .zip files. I am using unzip32.dll to do all the unzipping for me. How the app works is the selects a game, the equiv. graphic from a .zip file is extracted and displayed. Works fine.
    Is there a better, more efficient way of doing this ? For example, storing the graphics in a DLL file or some sort of resource file. I am new to the resource file and DLL portions so I'm not even sure if those are correct. But for grins, say I had graphics that were named 1.jpg - 100.jpg that I wanted to use, any ideas ?

    Thanks,

  2. #2
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186
    It all depends on what you want to do. If you have lots of little icon type pictures (like for buttons on a toolbar) you can use the ImageList control, or just use a resource file.
    If you have few graphics of varying size, use the resource file. You can also load them in hidden Pictureboxes or image controls, if you do not have very many of them.

    If your pictures are very large and you have a lot of them though, then keeping them seperate from your executable would be a very good idea. This way you only load them when you need them.

    The compression thing you are using sounds like the best for lots of large graphics. You can speed it up by having the files uncompressed, but it will obviously take more space.

    Shrog
    VB6 Ent SP5
    Win2000

  3. #3

    Thread Starter
    Lively Member bgalm's Avatar
    Join Date
    Jan 1999
    Posts
    65

    Thumbs up Thanks...

    I'll keep the larger graphics separate. Right now for the smaller ones I have a form (frmGraphics) and just load em from there, seems to work fine.
    As for the resource file, are there any pointer for creating/using these ? I have never used them before.

  4. #4
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186
    The quickest way to get going with resource files is to use the little resource editor that comes with VB (I think it comes with all versions?)

    It's not great, but it will allow you to do everything you want, and you will get the hang of the structure.

    Good Luck.
    Shrog
    VB6 Ent SP5
    Win2000

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