type is used to define the advanced characteristics of an icon. The characteristics of this icon can be defined and changed using different WLanguage properties.
: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable
// Load an icon
MyIcon is Icon = "Logo.ico"
// Modify the first image of the icon
MyIcon..Image..Image = "C:\MyImages\logo48.gif"
MyIcon.TransparencyColor = LightMagenta
MyIcon.Format = icoFormatBMP
// Save the modified icon
Properties specific to Icon variables
The following properties can be used to handle an icon:
|Property name||Type used||Effect|
|BitPerPixel||Array of integers||Array containing, for each image of the icon, the number of bits per image pixel.|
|Format||Array||Array containing the format for each icon image. The supported formats are: |
- BMP: the corresponding constant is icoFormatBMP.
- PNG: the corresponding constant is icoFormatPNG.
|Image||Array of Image||Array containing the images for each icon format. |
The dimensions of the specified images are kept. The system will choose the most suitable image according to its dimensions and to its number of colors (the first image found will be selected if two images have the same dimensions and the same number of colors).
|Palette||Array of Palette||Color palette for each icon image.|
|TransparencyColor||Array of Color||Array containing the transparency color for each image of the icon.|
|Value||Image (memo)||Value of the icon. This property is used to load an icon from a buffer, a file or a memo.|
Functions that use Icon variables
|dSaveImageICO||Saves an image in icon format either in a file, or in memory.|
|SysIconAdd||Adds a system tray icon (in the lower-right corner of the screen).|
|SysIconAddImage||Adds an icon that overlays the application icon in the taskbar.|
|SysIconModify||Modifies the icon file and/or the hover text of the icon in the taskbar (lower-right corner of the screen).|