ClassesClassesClassesClasses | | | | Operators

create_tray_iconcreate_tray_iconCreateTrayIconcreate_tray_iconCreateTrayIconCreateTrayIcon (Operator)

Name

create_tray_iconcreate_tray_iconCreateTrayIconcreate_tray_iconCreateTrayIconCreateTrayIcon — Displays a tray icon in the tray bar.

Signature

create_tray_icon( : : Tooltip, StockIconName, OptionalMessageQueue : TrayIconHandle)

Herror create_tray_icon(const char* Tooltip, const char* StockIconName, const Hlong OptionalMessageQueue, Hlong* TrayIconHandle)

Herror T_create_tray_icon(const Htuple Tooltip, const Htuple StockIconName, const Htuple OptionalMessageQueue, Htuple* TrayIconHandle)

Herror create_tray_icon(const HTuple& Tooltip, const HTuple& StockIconName, const HTuple& OptionalMessageQueue, Hlong* TrayIconHandle)

void CreateTrayIcon(const HTuple& Tooltip, const HTuple& StockIconName, const HTuple& OptionalMessageQueue, HTuple* TrayIconHandle)

void HNotificationX.CreateTrayIcon(
[in] VARIANT Tooltip, [in] VARIANT StockIconName, [in] VARIANT OptionalMessageQueue, [out] VARIANT* TrayIconHandle)

static void HNotification.CreateTrayIcon(HTuple tooltip, HTuple stockIconName, HTuple optionalMessageQueue, out HTuple trayIconHandle)

Description

create_tray_iconcreate_tray_iconCreateTrayIconcreate_tray_iconCreateTrayIconCreateTrayIcon displays a tray icon in the tray bar.

An overview of the available stock icon names for StockIconNameStockIconNameStockIconNameStockIconNameStockIconNamestockIconName on a Windows operating system is available at Windows Dev Center / SHSTOCKICONID enumeration The name in StockIconNameStockIconNameStockIconNameStockIconNameStockIconNamestockIconName has to be given without SIID_ prefix and is case-insensitive. For example, 'ERROR' or 'users' are valid names.

Here's a list of possible stock icon names on Windows. Please note that not every version of the operating system does support every icon. Furthermore, the icons 'heindlsolutions' and 'app' (the host application's icon, e.g. HDevelop) are available:

'docnoassoc'' Document of a type with no associated application.
'docassoc'' Document of a type with an associated application.
'application'' Generic application with no custom icon.
'folder'' Folder (generic, unspecified state).
'folderopen'' Folder (open).
'drive525'' 5.25-inch disk drive.
'drive35'' 3.5-inch disk drive.
'driveremove'' Removable drive.
'drivefixed'' Fixed drive (hard disk).
'drivenet'' Network drive (connected).
'drivenetdisabled'' Network drive (disconnected).
'drivecd'' CD drive.
'driveram'' RAM disk drive.
'world'' The entire network.
'server'' A computer on the network.
'printer'' A local printer or print destination.
'mynetwork'' The 'Network'' virtual folder.
'find'' The 'Search'' feature.
'help'' The 'Help and Support'' feature.
'share'' Overlay for a shared item.
'link'' Overlay for a shortcut.
'slowfile'' Overlay for items that are expected to be slow to access.
'recycler'' The Recycle Bin (empty).
'recyclerfull'' The Recycle Bin (not empty).
'mediacdaudio'' Audio CD media.
'lock'' Security lock.
'autolist'' A virtual folder that contains the results of a search.
'printernet'' A network printer.
'servershare'' A server shared on a network.
'printerfax'' A local fax printer.
'printerfaxnet'' A network fax printer.
'printerfile'' A file that receives the output of a 'Print to file'' operation.
'stack'' A category that results from a 'Stack by'' command to organize the contents of a folder.
'mediasvcd'' Super Video CD (SVCD) media.
'stuffedfolder'' A folder that contains only subfolders as child items.
'driveunknown'' Unknown drive type.
'drivedvd'' DVD drive.
'mediadvd'' DVD media.
'mediadvdram'' DVD-RAM media.
'mediadvdrw'' DVD-RW media.
'mediadvdr'' DVD-R media.
'mediadvdrom'' DVD-ROM media.
'mediacdaudioplus'' CD+ (enhanced audio CD) media.
'mediacdrw'' CD-RW media.
'mediacdr'' CD-R media.
'mediacdburn'' A writeable CD in the process of being burned.
'mediablankcd'' Blank writable CD media.
'mediacdrom'' CD-ROM media.
'audiofiles'' An audio file.
'imagefiles'' An image file.
'videofiles'' A video file.
'mixedfiles'' A mixed file.
'folderback'' Folder back.
'folderfront'' Folder front.
'shield'' Security shield.
'warning'' Warning.
'info'' Informational.
'error'' Error.
'key'' Key.
'software'' Software.
'rename'' A UI item, such as a button, that issues a rename command.
'delete'' A UI item, such as a button, that issues a delete command.
'mediaaudiodvd'' Audio DVD media.
'mediamoviedvd'' Movie DVD media.
'mediaenhancedcd'' Enhanced CD media.
'mediaenhanceddvd'' Enhanced DVD media.
'mediahddvd'' High definition DVD media in the HD DVD format.
'mediabluray'' High definition DVD media in the Blu-ray Disc format.
'mediavcd'' Video CD (VCD) media.
'mediadvdplusr'' DVD+R media.
'mediadvdplusrw'' DVD+RW media.
'desktoppc'' A desktop computer.
'mobilepc'' A mobile computer (laptop).
'users'' The 'User Accounts'' Control Panel item.
'mediasmartmedia'' Smart media.
'mediacompactflash'' CompactFlash media.
'devicecellphone'' A cell phone.
'devicecamera'' A digital camera.
'devicevideocamera'' A digital video camera.
'deviceaudioplayer'' An audio player.
'networkconnect'' Connect to network.
'internet'' The 'Network and Internet'' Control Panel item.
'zipfile'' A compressed file with a .zip file name extension.
'settings'' The 'Additional Options'' Control Panel item.
'drivehddvd'High definition DVD drive (any type - HD DVD-ROM, HD DVD-R, HD-DVD-RAM) that uses the HD DVD format.
'drivebd'High definition DVD drive (any type - BD-ROM, BD-R, BD-RE) that uses the Blu-ray Disc format.
'mediahddvdrom'High definition DVD-ROM media in the HD DVD-ROM format.
'mediahddvdr'High definition DVD-R media in the HD DVD-R format.
'mediahddvdram'High definition DVD-RAM media in the HD DVD-RAM format.
'mediabdrom'High definition DVD-ROM media in the Blu-ray Disc BD-ROM format.
'mediabdr'High definition write-once media in the Blu-ray Disc BD-R format.
'mediabdre'High definition read/write media in the Blu-ray Disc BD-RE format.
'clustereddrive'A cluster disk array.
'heindlsolutions' - Icon Heindl Solutions: The company logo of Heindl Solutions.
'app' - Default-Icon of the host application. For example, the icon of the hdevelop.exe executable, but might be different if you use this extension package within another executable.

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:

There is a variant of this operator to show a custom icon from a HALCON image in the tray bar which is available as create_tray_icon_imagecreate_tray_icon_imageCreateTrayIconImagecreate_tray_icon_imageCreateTrayIconImageCreateTrayIconImage.

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

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"

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

name of a stock icon

Default value: 'world' "world" "world" "world" "world" "world"

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_icon_imagecreate_tray_icon_imageCreateTrayIconImagecreate_tray_icon_imageCreateTrayIconImageCreateTrayIconImage

Module

Foundation


ClassesClassesClassesClasses | | | | Operators