PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Mouse (or stylus) operation on the icon
  • Icon in the taskbar
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
Adds an icon into the taskbar (bottom right corner of screen).
or
The following elements can be associated with this icon:
  • a popup menu,
  • a message when the icon is hovered by the mouse (or by the stylus),
  • a procedure automatically called when an operation is performed on the icon by the mouse (or by the stylus).
// Add the "C:\Icons\Icon.ICO" icon into the taskbar
ResAddIcon = SysIconAdd("C:\Icons\Icon.ICO", "", "Sales 2013")
Versions 21 and later
pProc is procédure = MyProc
SysIconAdd(fExeDir() + "\icon.ico", MENU_NoName1, "Message", pProc)
New in version 21
pProc is procédure = MyProc
SysIconAdd(fExeDir() + "\icon.ico", MENU_NoName1, "Message", pProc)
pProc is procédure = MyProc
SysIconAdd(fExeDir() + "\icon.ico", MENU_NoName1, "Message", pProc)
Syntax
<Result> = SysIconAdd(<Icon> [, <Menu name> [, <Rollover message> [, <WLanguage procedure>]]])
<Result>: Boolean
  • True if the icon was added,
  • False otherwise.
<Icon>: Character string or Icon variable
Corresponds to one of the following elements:
  • Name and full (or relative) path of the icon file to add. A UNC path is allowed.
  • Versions 20 and later
    Name of a variable of type Icon.
    New in version 20
    Name of a variable of type Icon.
    Name of a variable of type Icon.
Remark: The first valid image (other than PNG) found in the icon file is used and adapted to the 16x16 format. If the icon file contains in first position an image in 16x16 / 32 bpp, the quality of the icon will be very high. If the icon file contains in first position an image in 48x48 / 32 bpp, the quality of the icon will be very poor.
<Menu name>: Optional character string
Name of the context menu associated with the icon.
If this parameter corresponds to an empty string ("") or if it is not specified, no menu will be associated with the icon.
This menu will be displayed when a right click is performed on the icon by the mouse (or by the stylus). This menu must belong to an opened window (this window can be hidden).
<Rollover message>: Optional character string
Message displayed when the icon is hovered by the mouse cursor or by the stylus (up to 64 characters).
If this parameter is not specified or if it is an empty string (""), no rollover message is displayed.
<WLanguage procedure>: Optional procedure name
Name of the WLanguage procedure called during a mouse (or stylus) operation on the icon. If this parameter is not specified, no procedure will be run during a mouse operation on the icon.
Remark: This parameter can correspond to a Procedure variable.
Remarks

Mouse (or stylus) operation on the icon

<Procedure name> is called whenever a mouse (or stylus) operation is performed on the icon. This procedure is declared as follows:

PROCEDURE <Procedure name>(<Type of mouse/stylus operation>)
where <Type of mouse/stylus operation> corresponds to the Windows message identifying the type of operation performed by the mouse or stylus.
To easily manage the constants corresponding to the different types of operation, insert the following code in the initialization code of the project:
EXTERN "WinConst.wl"
The Winconst.wl file contains all the declarations of the Windows constants.
The different types of operations for the mouse are:
  • Left double click: WM_LBUTTONDBLCLK = 515
  • Left button down: WM_LBUTTONDOWN = 513
  • Left button up: WM_LBUTTONUP = 514
  • Middle double click: WM_MBUTTONDBLCLK = 521
  • Middle button down: WM_MBUTTONDOWN = 519
  • Middle button up: WM_MBUTTONUP = 520
  • Right double click: WM_RBUTTONDBLCLK = 518
  • Right button down: WM_RBUTTONDOWN = 516
  • Right button up: WM_RBUTTONUP = 517
The different types of operations for the stylus are:
  • Double click: WM_LBUTTONDBLCLK = 515
  • Button down: WM_LBUTTONDOWN = 513
  • Button up: WM_LBUTTONUP = 514

Icon in the taskbar

  • A single icon can be added into an application. You cannot add several ones.
  • SysIconModify is used to modify the icon.
  • SysIconDelete is used to delete the icon. The icon is automatically deleted when closing the application.
  • To add the icon into the taskbar without displaying the application in the taskbar, you must:
    • Use SysIconAdd to display the icon of the application.
    • Make the application invisible by applying WinStatus to the first project window.
Business / UI classification: Business Logic
Component: wd270std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment