Results 1 to 6 of 6

Thread: METHODS TO MAKE MY PROGRAM TAKE LESS SPACE

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Chicago
    Posts
    2

    Question

    My program has a lot of images. And what i have is by a timer control, a new image appears. My method to do this is i have bunch of images at same spot. All are set to invisible. And only one becomes visible at a time, and the rest are invisible. Then after couple of second another become visible and the rest are invisible.

    It works and all, but my program takes a whole a lot of space. How can i do this so it doesn't take much space?

    People have suggested to save all the images into a certain folder. And then call the images from the program. This method works, and it does make the program take less space, but if I distribute my program, people could edit the images and it will show up in my program. This method I don't like.

    Another person suggested that I save the files into a differnt file format that only my program can recognize the file extension, and keep these images with different format in a certain folder and call them up from my program. This method sounds good, but I don't know how to save something in a differnt file format so only my program can recognize.

    Does anyone have a solution to this problem? or know how to program the above solution? Please help. All help will be greatly appreciate. Thanks.

  2. #2
    Guest
    Have everything on in your Form as a JPEG or GIF. It will save a lot of memeory.

  3. #3
    New Member
    Join Date
    Jun 2000
    Location
    Singapore
    Posts
    8

    Lightbulb

    Compile your program to N-Code, with the option: Optimize for small code. This makes your program smaller.

    Get your pictures to JPEG or GIF and rename the extensions.
    PiKaPrO
    =======
    PiKa ProGraMMeR © 2000
    [email protected] No SPAMMERS!
    MSVB6.0 PRO SP3 Detected.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    If you have more than 40 images consider using a graphical method drawing you images on the form instead of overloading your resources and RAM with controls
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Guest
    Also, if you are using an PictureBox, you might want to consider using an ImageBox because they use hardly any resources.

  6. #6
    New Member
    Join Date
    Sep 1999
    Location
    Spain
    Posts
    12
    Hello UstadBhai:

    You must search the balance between speed and size. If you set you images in desing time, then you are saving them as a resource in the same .exe file. That makes exe file too long. If you load images at run time, it supposes a waste of time, that is bigger if you images are compressed (gif or jpg), and end user can modify your images.

    I recommend you to load the images when program starts. Don't use an image control for every image, because it suposses a great waste in graphics resources. Use only an image control to show the selected picture, and a image list control (Microsoft common controls) to contain all pictures. To avoid user modifications, store all your pictures in a resource file (.res).

    I think that's the best way.

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