4D v14.3GET ICON RESOURCE |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
GET ICON RESOURCE
|
GET ICON RESOURCE ( resID ; resData {; fileRef} ) | ||||||||
Parameter | Type | Description | ||||||
resID | Longint |
![]() |
Icon resource ID number | |||||
resData | Picture |
![]() |
Picture field or variable to receive the picture | |||||
![]() |
Contents of the cicn resource | |||||||
fileRef | DocRef |
![]() |
Resource file reference number, or all open resource files, if omitted | |||||
The GET ICON RESOURCE command returns, in the picture field or variable resData, the icon stored in the color icon (“cicn”) 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.
The following example loads, in a Picture array, the color icons located in the active 4D application:
If(On Windows)
$vh4DResFile:=Open resource file(Replace string(Application file;".EXE";".RSR"))
Else
$vh4DResFile:=Open resource file(Application file)
End if
RESOURCE LIST("cicn";$alResID;$asResName;$vh4DResFile)
$vlNbIcons:=Size of array($alResID)
ARRAY PICTURE(ag4DIcon;$vlNbIcons)
For($vlElem;1;$vlNbIcons)
GET ICON RESOURCE($alResID{$vlElem};ag4DIcon{$vlElem};$vh4DResFile)
End for
After this code has been executed, the array looks like this when displayed in a form:
If the resource is found, OK is set to 1. Otherwise, it is set to 0 (zero).
Product: 4D
Theme: Resources
Number:
517
Created: 4D v6
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)