This function assigns the content of a file to an IMAGE variable.
Important: The content of the image variable cannot be displayed in the Visual Adelia IMAGE object, even if the file is a .bmp file. To display the content, use the VaToolBxLoadBitmap function or the IMAGE object's LOAD_BITMAP method.
Context
Windows client,
Windows server,
Java client,
Java server,
Adelia Web client,
Adelia Cloud client,
Event Adelia client.
Parameters
ALPHA(n) |
FileName |
Name of the file to be read. |
IMAGE |
ImageVar |
Variable that is to hold the content of FileName. |
NUM_BIN_2 |
ReturnCode |
Return code for the operation. 0 Operation completed successfully. -1 Cannot open file. -2 Cannot read file. |
Example
FileName = 'C:\temp\document.doc'
CALL_DLL 'VATOOLBX.DLL' 'VaToolBxFileToImage' FileName ImageVar ReturnCode
* => ImageVar holds the content of file c:\temp\document.doc
Click below for more details about the following elements:
The VaToolBxLoadBitmap function
The IMAGE basic graphical object
List of the VaToolBx functions by topic