Help / WLanguage / WLanguage functions / Controls, pages and windows / Drawing functions / Types of variables
  • Properties specific to Icon variables
  • Functions that use Icon variables
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
The Icon 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.
Remark: 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[1]..Image = "C:\MyImages\logo48.gif"
MyIcon.TransparencyColor[1] = LightMagenta
MyIcon.Format[1] = icoFormatBMP
// Save the modified icon
dSaveImageICO(MyIcon, "Logo.ico")

Properties specific to Icon variables

The following properties can be used to handle an icon:
Property nameType usedEffect
BitPerPixelArray of integersArray containing, for each image of the icon, the number of bits per image pixel.
FormatArrayArray containing the format for each icon image. The supported formats are:
  • BMP: the corresponding constant is icoFormatBMP.
  • PNG: the corresponding constant is icoFormatPNG.
ImageArray of ImageArray 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).
PaletteArray of PaletteColor palette for each icon image.
TransparencyColorArray of ColorArray containing the transparency color for each image of the icon.
ValueImage (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

dSaveImageICOSaves an image in icon format either in a file, or in memory.
SysIconAddAdds a system tray icon (in the lower-right corner of the screen).
SysIconAddImageAdds an icon that overlays the application icon in the taskbar.
SysIconModifyModifies the icon file and/or the hover text of the icon in the taskbar (lower-right corner of the screen).
Minimum version required
  • Version 19
This page is also available for…
Click [Add] to post a comment

Last update: 01/26/2023

Send a report | Local help