Skip to content

AddIcon - cImageList32

Adds an icon to the image list.

Type: Function
Return Data Type: Integer

Parameters

Parameter Type Description
sImage String The image filename being added. It can be a fully-qualified name or the name of a file that can be found in the program's Workspace.

Syntax

Function AddIcon String sImage Returns Integer

Call Example

Get AddIcon sImage to IntegerVariable

Description

Call the AddIcon function during the OnCreate event to add icon images into the image list. Use this function when the icon's filename extension is different to the default of .ico. In all other cases it is recommended to use the generic AddImage function.

Return Value

The return value is the index of the image that was added. If the image could not be added, -1 is returned.