Operators |
create_tray_icon_image — Displays a tray icon in the tray bar.
create_tray_icon_image(Icon : : Tooltip, OptionalMessageQueue : TrayIconHandle)
create_tray_icon_image displays a tray icon in the tray bar.
The icon in Icon must be a gray value image (1 channel) or color image (3 channels). We recommend a size of 32x32.
The string in Tooltip can have a maximum size of 127 characters because of restrictions of the operating system. Longer texts are truncated automatically.
The handle of a previously create message queue (create_message_queue) can be specified in OptionalMessageQueue. This message queue then receives events of the tray bar. The caller has to ensure that the handle of the message queue is valid as long as the tray icon is in use, i.e. until clear_tray_icon has been called. Possible messages are listed in the description of create_tray_icon.
There is a variant of this operator to show stock icons from the operating system in the tray bar which is available as create_tray_icon.
Find more information about the Notification extension package in the introduction to this chapter.
In contrast to HALCON internal handles the tray icons cannot be reset automatically if the program is reset in HDevelop (key F2). Therefore we recommand to add the operator call clear_all_tray_icons at the beginning of a HDevelop script to clear manually.
An image to be shown as icon in the tray bar
optional HALCON message queue
Default value: []
handle to the tray icon
clear_tray_icon, clear_all_tray_icons
Foundation
Operators |