Results 1 to 11 of 11

Thread: Best way?

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Best way?

    I'm trying to find the best way to store my programs skin files. I don't want to create a directory for every skin file and store all the images and skin files in the directory.

    I want to do something like winamp does. Create a .zip like file (even if it doesn't compress) and store all the files in there. If I were to do that, how would I extract them when the skin is initialized? Should I send them to a temporary directory, then delete them after they're all loaded?

    Or is there a better idea that I haven't thought of?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2

    Re: Best way?

    Originally posted by The Hobo
    Should I send them to a temporary directory, then delete them after they're all loaded?
    That's what I would do. You can use the "official" temp directory too:
    VB Code:
    1. Msgbox Environ$("TEMP")

  3. #3

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    It won't seem like I'm ripping off WinAMP will it?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4
    I'm sure other programs use this technique. Windowblinds does, for example.

  5. #5
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    OK, heres what you CAN do ^^

    OK, heres what you do. You load lets say you want to import
    jpeg.jpg. You open a text file, in another file, open jpeg.jpg's
    binary as string.

    In the text file, make like a splitter...you know, some random
    ASCII crap. THen you plop the image's binary there.

    When you want to open this skin and do stuff to\with it (such as
    displaying the skin), you open the txt, say Split(MyTextVar, "My
    Random ASCII Crap").

    Then, the different Array elements are the different images... you
    save them as bitmaps or whatever in the temp folder, you then
    load them back up in an image box or whatever;.


    This helP?
    Luke

  6. #6

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    If you're trying to tell me how to archive or zip things, I already have that code of my program written. But thanks anyways.

    If you're talking about something else, then you've lost me.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  7. #7
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    heh

    Nah, im not talking about that. I'm talking about a cheap file
    merging technique!
    Luke

  8. #8

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Re: heh

    Originally posted by macai
    Nah, im not talking about that. I'm talking about a cheap file
    merging technique!
    File Merging is a basically what archiving is. It's just like zipping, but without compression.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  9. #9
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    wha?

    ok, yeah...

    you got me.

    But you asked how to do something and it looked like you
    wanted to know how to merge\archive etc... oh well, sorry.
    Luke

  10. #10

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I just wanted to know if that'd be the best way to do it. But thanks for tryin' to help, brotha'z!
    My evil laugh has a squeak in it.

    kristopherwilson.com

  11. #11
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    hmm

    Hmm, let me put it this way;

    If your looking for ease of creation etc, Make a Directory With
    All the Skin's Files
    .

    If your looking for integrity, Archive the files into a file with
    a custom file extension.
    Luke

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