PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Adding an icon to the taskbar
SysIconAdd (Example)
Adding an icon to the taskbar
WINDEVReports and QueriesUser code (UMC) 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