ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Various properties
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Icon property is used to:
  • Find out the icon displayed in the title bar of a window or a Dockable Panel control.
  • Change the icon displayed in the title bar of a window or a Dockable Panel control.
Example
// Find out the icon displayed in the "WIN_CustomerInput" window
ResIcon = WIN_CustomerInput.Icon
// Modify the icon displayed in the "WIN_CustomerInput" window
 
// By using a ".ico" file:
WIN_CustomerInput.Icon = "MyIcon.ico"
 
// By using an Image control:
WIN_CustomerInput.Icon = dSaveImagePNG(IMG_Image1, inMemory)
Syntax

Retrieving the window icon Hide the details

<Result> = <Element used>.Icon
<Result>: Character string
Icon of the specified element. The icon name is returned without its path.
<Element used>: Control name or window name
  • Name of window to use.
  • Name of the Dockable Panel control to use.

Modifying the window icon Hide the details

<Element used>.Icon = <New value>
<Element used>: Control name or window name
  • Name of window to use.
  • Name of the Dockable Panel control to use.
<New value>: Character string or Buffer variable
Corresponds to:
  • Name and path (full, relative or UNC) of new icon. This icon must be in ".ico" format.
    Remarks:
    • If the path is not specified, the icon file will be sought in the executable directory.
    • The current icon will be kept if the icon file does not exist.
  • Byte string returned by one of the following functions:
Remarks
  • The icon of first project window is displayed:
    • In the Windows taskbar.
    • In the navigation window when pressing Alt + Tab.
  • The modification of an icon can only be performed on the opened windows. A WLanguage error occurs if the window is closed.
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/15/2023

Send a report | Local help