Operators |
create_tray_icon — Displays a tray icon in the tray bar.
create_tray_icon( : : Tooltip, StockIconName, OptionalMessageQueue : TrayIconHandle)
create_tray_icon displays a tray icon in the tray bar.
An overview of the available stock icon names for StockIconName on a Windows operating system is available at Windows Dev Center / SHSTOCKICONID enumeration The name in StockIconName 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 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:
Key: 'tray_icon_select', TupleData: TrayIconHandle
Key: 'tray_balloon_click', TupleData: TrayIconHandle
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_image.
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.
optional HALCON message queue
Default value: []
handle to the tray icon
clear_tray_icon, clear_all_tray_icons
Foundation
Operators |