Get_Icon_Count
Purpose
To return the number of icons in an icon library.
Syntax
Get_Icon_Count {file-name} To {variable}
Argument Explanation
- sFilename: The name of an icon library file. This must be a full path to the file, including the folder and file name.
- variable: A variable into which the number of icons is returned.
What It Does
Get_Icon_Count returns the number of icons in the icon library file whose name is in sFilename.
Example
Integer iIcons
String sFileName
Get_File_Path "Order.Ico" to sFileName
If (sFileName ne "") Begin
Get_Icon_Count sFileName To iIcons
Showln "There are " iIcons " icons in the file " sFileName
End
Else;
Showln "Cannot find Order.Ico in DFPath"
In this example, the number of icons in the file Order.Ico is reported. Note how Get_File_Path is used to find a complete path for Get_Icon_Count. Get_Icon_Count requires a fully qualified path name to the icon library file. The reason for this is that many icons reside in system files that are unlikely to be in the directories of the DFPATH registry value.