Home > Enterprise >  Where are the images in a TImageCollection held Delphi
Where are the images in a TImageCollection held Delphi

Time:04-04

Is it possible to access the images in TImageCollection from the executable or the resource file. i.e. outside the IDE. How are these images held?

CodePudding user response:

Yes, image list and image collection images are stored in the DFM files. You can see this if you go to the form or data module containing the image list or collection, and then press Alt F12 to see the DFM code. Alternatively, you can simply open the DFM file in your favourite text editor.

And these DFMs are embedded into your EXE as RCDATA resources, so you can see them if you open your EXE in a resource editor.

CodePudding user response:

At runtime, your EXE can access the images via the TImageCollection.Images property, which is a collection of TImageCollectionItem objects.

TImageCollectionItem has a SourceImages property, which is a collection of TImageCollectionSourceItem objects.

TImageCollectionSourceItem has an Image property of type TWICImage

  • Related