ClassesClassesClassesClasses | | | | Operators

create_tray_icon_imagecreate_tray_icon_imageCreateTrayIconImagecreate_tray_icon_imageCreateTrayIconImageCreateTrayIconImage (Operator)

Name

create_tray_icon_imagecreate_tray_icon_imageCreateTrayIconImagecreate_tray_icon_imageCreateTrayIconImageCreateTrayIconImage — Displays a tray icon in the tray bar.

Signature

create_tray_icon_image(Icon : : Tooltip, OptionalMessageQueue : TrayIconHandle)

Herror create_tray_icon_image(const Hobject Icon, const char* Tooltip, const Hlong OptionalMessageQueue, Hlong* TrayIconHandle)

Herror T_create_tray_icon_image(const Hobject Icon, const Htuple Tooltip, const Htuple OptionalMessageQueue, Htuple* TrayIconHandle)

Herror create_tray_icon_image(Hobject Icon, const HTuple& Tooltip, const HTuple& OptionalMessageQueue, Hlong* TrayIconHandle)

void CreateTrayIconImage(const HObject& Icon, const HTuple& Tooltip, const HTuple& OptionalMessageQueue, HTuple* TrayIconHandle)

void HNotificationX.CreateTrayIconImage(
[in] IHUntypedObjectX* Icon, [in] VARIANT Tooltip, [in] VARIANT OptionalMessageQueue, [out] VARIANT* TrayIconHandle)

static void HNotification.CreateTrayIconImage(HObject icon, HTuple tooltip, HTuple optionalMessageQueue, out HTuple trayIconHandle)

Description

create_tray_icon_imagecreate_tray_icon_imageCreateTrayIconImagecreate_tray_icon_imageCreateTrayIconImageCreateTrayIconImage displays a tray icon in the tray bar.

The icon in IconIconIconIconIconicon must be a gray value image (1 channel) or color image (3 channels). We recommend a size of 32x32.

The string in TooltipTooltipTooltipTooltipTooltiptooltip 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_queuecreate_message_queueCreateMessageQueuecreate_message_queueCreateMessageQueueCreateMessageQueue) can be specified in OptionalMessageQueueOptionalMessageQueueOptionalMessageQueueOptionalMessageQueueOptionalMessageQueueoptionalMessageQueue. 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_iconclear_tray_iconClearTrayIconclear_tray_iconClearTrayIconClearTrayIcon has been called. Possible messages are listed in the description of create_tray_iconcreate_tray_iconCreateTrayIconcreate_tray_iconCreateTrayIconCreateTrayIcon.

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_iconcreate_tray_iconCreateTrayIconcreate_tray_iconCreateTrayIconCreateTrayIcon.

Find more information about the Notification extension package in the introduction to this chapter.

Attention

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_iconsclear_all_tray_iconsClearAllTrayIconsclear_all_tray_iconsClearAllTrayIconsClearAllTrayIcons at the beginning of a HDevelop script to clear manually.

Parallelization

Parameters

IconIconIconIconIconicon (input_object)  image(-array) objectHObjectHObjectHImageHObjectXHobject

An image to be shown as icon in the tray bar

TooltipTooltipTooltipTooltipTooltiptooltip (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

tooltip to be shown in tray bar

Default value: 'title' "title" "title" "title" "title" "title"

OptionalMessageQueueOptionalMessageQueueOptionalMessageQueueOptionalMessageQueueOptionalMessageQueueoptionalMessageQueue (input_control)  message_queue HTupleHTupleHMessageQueue, HTupleVARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

optional HALCON message queue

Default value: []

TrayIconHandleTrayIconHandleTrayIconHandleTrayIconHandleTrayIconHandletrayIconHandle (output_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

handle to the tray icon

Possible Predecessors

create_message_queuecreate_message_queueCreateMessageQueuecreate_message_queueCreateMessageQueueCreateMessageQueue

Possible Successors

clear_tray_iconclear_tray_iconClearTrayIconclear_tray_iconClearTrayIconClearTrayIcon, clear_all_tray_iconsclear_all_tray_iconsClearAllTrayIconsclear_all_tray_iconsClearAllTrayIconsClearAllTrayIcons

Alternatives

create_tray_iconcreate_tray_iconCreateTrayIconcreate_tray_iconCreateTrayIconCreateTrayIcon

Module

Foundation


ClassesClassesClassesClasses | | | | Operators