|
-
Mar 25th, 2005, 04:18 PM
#1
Thread Starter
Lively Member
Save some memory
I have notised that when i run my application in win 98 it takes to much memory. Sometimes i get the "Out of memory" error. If i try to run other programs while my application is running i get an error message like "There is not enough memory to run this program".
My application works fine with win200 and winxp, but not on win98 even tho i have 512 mb of ram.
My compiled EXE-file is about 2,3 mb and contains about 1800 controls. I have 80 pictureboxes that i use as containers to the other controls. I also use the pictureboxes to display a backgroundimage, if the user wants that (thats why i´m not using frames).
I belive that it is the pictureboxes that takes up most of the memory, and if i would make about 10 arrays of them, could that save a few mb of memory?
Maybe i should mention that 1241 of those controls is arrays of labels
Last edited by john42; Mar 26th, 2005 at 02:53 AM.
Hej på dej!
-
Mar 25th, 2005, 05:05 PM
#2
Re: Save some memory
 Originally Posted by john42
... My compiled EXE-file is about 2,3 mb and contains about 1800 controls. I have 80 pictureboxes that i use as containers to the other controls. I also use the pictureboxes to display a backgroundimage, if the user wants that (thats why i´m not using frames). ...
Man, sounds like a real killer app ... You may want to reconsider your design - use control arrays, create new controls/containers/etc at runtime, load images only when necessary and unload then when you done ... and so on and so forth ...
1800 controls ... 80 pictureboxes ... common ...
-
Mar 25th, 2005, 10:18 PM
#3
Fanatic Member
Re: Save some memory
you have what we call "load-over-trol" -
You may want to re-think your design as RhinoBull also suggests...
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
|