PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Adding an icon into the taskbar
  • Adding an icon into the taskbar
SysIconAdd (Example)
Adding an icon into 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
Adding an icon into the taskbar
Windows Mobile The following code is used to add an icon into the taskbar. The icon file is named "\MyIcons\Icons.ICO". The popup menu is named "IconMenu". The rollover message is "Sales 2001". During a stylus operation on the icon, the "OpenFile" procedure is called. If the stylus operation performed on the icon corresponds to a click, the "OpenFile" procedure opens the file named "\MyDocuments\Sales2001.TXT" in Word via ShellExecute.
// Initialize the AddIcon window
CONSTANT
WM_LBUTTONDOWN = 513
END

// Add an icon into the taskbar
SysIconAdd("\MyIcons\Icons.ICO", "IconMenu", "Sales 2001", "OpenFile")
// Local OpenFile procedure
PROCÉDURE OpenFile(StylusMessage)
// Click?
IF StylusMessage = WM_LBUTTONDOWN THEN
 // Open the"\MyDocuments\2001Sales.txt" file in Word
 ShellExecute("\MyDocuments\Sales2001.TXT")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment