TImageEnIO.LoadFromResource
Declaration
procedure LoadFromResource(const ModulePath: WideString; const ResourceType: String; const ResourceName: String; Format: TIOFileType);
Description
Loads the specified image resource from PE files like EXE, DLL, OCX, ICL, BPL, etc.
Parameter | Description |
ModulePath | Specifies the path and filename of PE module. |
ResourceType | Resource type as string (ie 'Bitmap', 'Cursor'). |
ResourceName | Resource name as string (ie 'INTRESOURCE:100', 'Hand'). |
Format | Specifies the expected file format. If Format is ioUnknown, then try to find the format automatically. ioUnknown should fail for BMP, ICO and CUR resources. |
Example
// Load resource 143, in "Bitmap"s, from "explorer.exe" (should be a small Windows logo)
ImageEnView1.IO.LoadFromResource('explorer.exe', 'Bitmap', 'INTRESOURCE:143', ioBMP);
See Also
-
TIEResourceExtractor-
LoadFromResource