Mega Code Archive

 
Categories / Delphi / Examples
 

Reducing used gdi resources [use timagelist]

You need to reduce the amount of GDI resources used by your application? Check out this: Each and every TBitmap/TIcon/TImage you use, consumes one handle. And Windows (Win95, 98 and NT) can only handle a restricted amount of handles. The %-resources show you how many percent of the handles are not used yet. So you should use TImageList. This is a bitmap/icon container, in which you can put all images/icons that have the same size and color depth. And every TImageList consumes only one handle. For other ways to save memory, take a look at the 'See Also' section.