-
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,
-
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
-
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.
-
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