ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / System functions
  • Adding an icon to the taskbar
SysIconAdd (Example)
Adding an icon to the taskbar
Reports and Queries The following code is used to add an icon into the taskbar. The icon file is named "C:\MyIcons\Icons.ICO". The popup menu is named "IconMenu". The rollover message is "Sales 2001". During a mouse operation on the icon, the "OpenFile" procedure is called. If the mouse operation performed on the icon corresponds to a double left click, the "OpenFile" procedure opens the file named "C:\MyDocuments\Sales2001.DOC" in Word via ShellExecute.
// Initialize the AddIcon window
CONSTANT
WM_LBUTTONDBLCLK = 515
END
 
// Add an icon into the taskbar
SysIconAdd("C:\MyIcons\Icons.ICO", "IconMenu", "Sales 2001", "OpenFile")
// Local OpenFile procedure
PROCÉDURE OpenFile(MouseMessage)
// Left double click?
IF MouseMessage = WM_LBUTTONDBLCLK THEN
 // Open the"C:\MyDocuments\2001Sales.DOC" file in Word
 ShellExecute("C:\MyDocuments\Sales2001.DOC")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help