Loads the Icon property from raw image data instead of an image file.
Syntax
rv = Send_Message(Ctrl, "OLE.LoadRawImage", Data, Size)
Parameters
Parameter | Description |
---|---|
Data | The binary data of an image file |
Size | The size, in bytes, of the binary image data |
Returns
1 if the image loaded successfully, 0 if not.
Remarks
The LoadRawImage method is provided as a means of loading images from raw data than from files. This is useful if you want to store your images as database records rather than hard files. The raw data, however, must be the same binary data that is in a bitmap or icon file. Otherwise, the image will not be loaded.
The Data parameter is the raw image data, and the Size parameter is the size of the Data in bytes. Make sure the size is accurate, or the image will not be loaded.
Example
// Read the raw image data and load it into the button Open "IMAGES" to ImagesTable then Read ImageData from ImagesTable, "BUTTON1" then rv = Send_Message(@Window:".OLE_BUTTON", "OLE.LoadRawImage", ImageData, Len(ImageData)) end end