AddSysTrayIcon()
Syntax
Result = AddSysTrayIcon(#SysTrayIcon, WindowID, ImageID)Description
Add an icon in the SysTray area. If #PB_Any is used as '#SysTrayIcon' parameter, the new systray icon identifier will be returned as 'Result'. WindowID must be a valid WindowID(). ImageID must be a previously loaded image (using LoadImage()) but only ICON type (.ico) image are supported for this command. UseImage() can be used to get easily this ID.
When an event occurs on any of the SysTray icons the #PB_EventSysTray event is returned. EventGadgetID() can be used to know which SysTrayIcon has been used. EventType() commands is also updated by this command.
Note: All SysTray icons are automatically removed when the program ends.
Supported OS
Windows