Skip to main content
Version: 21 R4 BETA

GET PICTURE RESOURCE

GET PICTURE RESOURCE ( resID : Integer ; resData : Field, Variable {; resFile : Time} )

ParameterTypeDescription
resIDInteger→Resource ID number
resDataField, Variable↔in: Picture field or variable to receive the picture
out: Contents of the PICT resource
resFileTime→Resource file reference number, or all open resource files, if omitted
History
ReleaseChanges
6Created

Description​

The GET PICTURE RESOURCE command returns in the picture field or variable resData the picture stored in the picture (“PICT”) resource whose ID is passed in resID.

If the resource is not found, the resData parameter is left unchanged, and the OK variable is set to 0 (zero).

If you pass a valid resource file reference number in resFile, the resource is searched for in that file only. If you do not pass resFile, the first occurrence of the resource found in the resource files chain is returned.

Note: A picture resource can be at least several megabytes in size.

Example​

See example for the RESOURCE LIST command.

System variables and sets​

If the resource is found, OK is set to 1. Otherwise, it is set to 0 (zero).

Error management​

If there is not enough memory to load the picture, an error is generated. You can catch this error with an error-handling method installed using ON ERR CALL.

See also​

ON ERR CALL

Properties​

Command number502
Thread safeno
Modifies variablesOK, error