How to place an application (or process) icon on the taskbar?

    2 answers 2

    The Shell_NotifyIcon function adds, deletes and changes the icon. NOTIFYICONDATA - structure for storing an icon.

    • There on the link Shell_NotifyIcon there is an example. - Ildar

    Use the CoolTrayIcon component (or TJvTrayIcon).

    1. Download component.
    2. Add it to the form.
    3. In the properties you set an icon.
    4. In the properties set the value of IconVisible to true.

    To hide the program in tray:

     CoolTrayIconX.HideMainForm; 

    To show the program from the tray:

     CoolTrayIconX.ShowMainForm; 

    If you do not want a component, you can do everything yourself using the Windows API function Shell_NotifyIcon.

    • Thank. The first is optimal for Delph, the second is for all cases. - Oleg53