|
-
Jun 6th, 2000, 04:04 AM
#1
Thread Starter
New Member
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.
-
Jun 6th, 2000, 05:08 AM
#2
Have everything on in your Form as a JPEG or GIF. It will save a lot of memeory.
-
Jun 6th, 2000, 05:45 AM
#3
New Member
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.
-
Jun 6th, 2000, 06:24 AM
#4
transcendental analytic
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.
-
Jun 6th, 2000, 07:39 AM
#5
Also, if you are using an PictureBox, you might want to consider using an ImageBox because they use hardly any resources.
-
Jun 6th, 2000, 01:54 PM
#6
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|