PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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).
Reports and Queries
// Add the "C:\Icons\Icon.ICO" icon into the taskbar
ResAddIcon = SysIconAdd("C:\Icons\Icon.ICO", "", "Sales 2013")
Versions 21 and later
pProc is Procedure = MyProc
SysIconAdd(fExeDir() + "\icon.ico", MENU_NoName1, "Message", pProc)
New in version 21
pProc is Procedure = MyProc
SysIconAdd(fExeDir() + "\icon.ico", MENU_NoName1, "Message", pProc)
pProc is Procedure = MyProc
SysIconAdd(fExeDir() + "\icon.ico", MENU_NoName1, "Message", pProc)
Syntax
<Result> = SysIconAdd(<Icon> [, <Menu name> [, <Rollover Message> [, <Procedure name>]]])
<Result>: Boolean
  • True if the icon was added,
  • False otherwise.
<Icon>: Character string (between quotes) 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 Icon variable.
    New in version 20
    Name of Icon variable.
    Name of Icon variable.
Note: 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 (with quotes)
Name of the popup 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 (with quotes)
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.
<Procedure name>: Optional character string (with or without quotes)
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.
This parameter must be specified between quotes).
Versions 21 and later
Note: This parameter can correspond to a Procedure variable.
New in version 21
Note: This parameter can correspond to a Procedure variable.
Note: 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 mouse/stylus operations.
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.
Component : wd250std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Observações
O arquivo Winconst.wl contém todas as declarações das constantes do Windows.
Os diferentes tipos de operações para o mouse são:
Clique duas vezes à esquerda: WM_LBUTTONDBLCLK = 515
Botão esquerdo para baixo: WM_LBUTTONDOWN = 513
Botão esquerdo para cima: WM_LBUTTONUP = 514
Clique duas vezes no meio: WM_MBUTTONDBLCLK = 521
Botão do meio para baixo: WM_MBUTTONDOWN = 519
Botão do meio para cima: WM_MBUTTONUP = 520
Clique duas vezes com o botão direito do mouse: WM_RBUTTONDBLCLK = 518
Botão direito do mouse para baixo: WM_RBUTTONDOWN = 516
Botão direito do mouse para cima: WM_RBUTTONUP = 517
Os diferentes tipos de operações para a caneta são:
Clique duas vezes: WM_LBUTTONDBLCLK = 515
Botão para baixo: WM_LBUTTONDOWN = 513
Botão para cima: WM_LBUTTONUP = 514
BOLLER
04 Sep. 2019
Example
https://repository.windev.com/resource.awp?file_id=281474976710823;trayicon-sysicon-exemplo-projeto-rodando-relogio-windows
BOLLER
13 Aug. 2019
Video SysIconAdd
https://youtu.be/YtOFvD7QS4w

https://windevdesenvolvimento.blogspot.com/2019/06/dicas-2167-windev-webdev-mobile.html
amarildo
26 Jun. 2019