Results 1 to 15 of 15

Thread: Images question

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Images question

    I've got a question I wonder if anybody know how I can do this. I wanting to make like an exteral image package file that a program can then read and load the images out of that package. Is there a way to do that?

    Thanks for any help I get in advance.

  2. #2
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Images question

    What, you mean like Winzip does?

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Re: Images question

    Something like that.

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Images question

    You need to use a resource file. As long as the images don't change it would be perfect.

  5. #5

  6. #6

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Re: Images question

    Is it possible to make like an add in file in vb for a program created in vb?

  7. #7
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Images question

    The only way to do that would be to include a scripting component to your program. You would have to program the whole parser yourself, and then instead of the usual executables you would load the script file, parse it, and load the new "add-on".

    Other than that, I don't think it's possible to just create and executable, and make it part of an already compiled program. You "could" have the programs communicate, making the effect of an add-in. For example, Winsock. Have them message each other. Meh, I don't know, but what you ask isn't directly possible.

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Images question

    You have to recompile the resource file to change it. Sorry.

  9. #9

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Re: Images question

    So if I wanted to do something like the game The Sims does with .iff files, thats not possible to do using VB?

  10. #10
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Images question

    I don't know what they do, but you could certainly add files to a program, you just can't compile them into the original project, or its resource file. You could place them in an Image folder, or even zip them up. You can even read a few images into a file. Search the forums, I've seen an example or two.

  11. #11
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Images question

    I dunno why but all of you obviously skipped this link

    http://www.planet-source-code.com/vb...11393&lngWId=1

    It source code in VB that paks multiple files into one file without compression, and can easily be extracted. If modified, you can have it to where it holds (as well as loads) just images. That'll be your package.

  12. #12

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Re: Images question

    How would I use a property bag in vb to store and read images? It seems to be able to do exactly what I want.

  13. #13

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Re: Images question

    After trying to use the property bag in vb, it didn't work. I did find a little info on resource library files, like I'm wanting to do, but no example source code to see how to actually use a resource library dll. Does anybody here know where I can find a good tutorial on making and using resource library dlls to store gif's in or an example source code?

    Thanks

  14. #14
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Images question

    Here is some code that successfully uses the property bag. Extract it and open the VBG (Group) Project. Run it. The form will open.

    Move the form anywhere that you want, and then click the X to close it.


    Run the program again, and the form will be at the same position that you left it.
    Attached Files Attached Files

  15. #15

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    51

    Re: Images question

    Thats for that example code for the property bag feature in vb. I'll give it a try.

    I've started to get farther on using making resource library dlls now. I found an example code to learn from to load bmp, icons, and strings form an external dll file but not for the custom section in a resource dll. I've got the gif images stored in the custom section in my dll, but now how do I load the gif's images from the dll into my program?

    Heres a link to the example code I found for bmp's, icon's and string's.
    http://www.planetsourcecode.com/vb/s...11683&lngWId=1

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