Robert May > Win32-GUI > Notify

Download:
Win32-GUI/Win32-GUI-1.06.tar.gz

Annotate this POD

CPAN RT

New  9
Open  7
View/Report Bugs
Source  

NAME ^

Notify Icon Tester

SYNOPSIS ^

perl NotifyIcon.pl

OVERVIEW ^

This program has evolved from a simple utility designed to allow for testing of the Win32::GUI::NotifyIcon functionality into a program showing off some of the features available from Win32::GUI.

VERSIONS ^

This program requires Win32::GUI v1.03_01 or higher, and should run with any 32-bit version of windows (Win95/98/NT/ME/2K/XP). The version of Win32::GUI is displayed in the 'Version Information' panel.

Different versions of windows ship with different version of shell32.dll. Some versions of Internet Explorer may update the system version of shell32.dll. The version of shell32.dll installed on your system is displayed in the 'Version Information' panel. Balloon tooltips and some of the notification events are only available with shell32.dll V5.0 and later. Functions that are not available will be disabled in the GUI.

USING ^

Showing and Removing the tray icon

Pressing the bottom-right button 'Show/Remove Notify Icon' shows and removes a tray icon from the taskbar's system tray.

Selecting the icon

By default the Win32::GUI icon is displayed in the system tray. It is possible to change this icon by selecting the 'Change Icon ...' option from the 'File' menu, or by pressing the 'Change Icon ...' button.

The file selected must be a vaild windows icon (usually a *.ico file). The microsoft documentation give the following limitations for the icon colour depth:

To avoid icon distortion, be aware that notification area icons have different levels of support under different versions of Microsoft Windows. Windows 95, Windows 98, and Microsoft Windows NT 4.0 support icons of up to 4 bits per pixel (BPP). Windows Millennium Edition (Windows Me) and Windows 2000 support icons of a color depth up to the current display mode. Windows XP supports icons of up to 32 BPP.

Setting the Tooltip

Text entered in the Tooltip Text Textfield will be displayed as a tooltip when the icon is displayed in the system tray and the mouse hovers over the icon. The text is limited to 63 characters for shell32.dll before 5.0 and 127 characters for later versions.

Balloon Tooltips

Balloon tooltips are available to systems with shell32.dll greater than 5.0. Balloon tooltips are larger tooltips, capable of showing more information. While the notify icon is displayed in the taskbar a balloon tooltip can be shown and hidden using the 'Show Balloon' and 'Hide Balloon' buttons. The 'Show while editing' checkbox, if checked, shows the balloon tooltip while you edit it's contents within the 'Balloon Tooltip' panel. You may adjust the following values affecting the display of a Balloon Tooltip:

Title

Sets the title of the balloon tooltip. The title is displayed in bold at the top of the tooltip.

Body

The main content of the balloon tooltip. The ballon tooltip will not be displayed if this field is empty.

Icon

Set the system icon that is displyed next to the balloon tooltip title. One of: none (no icon), info, warn or error. The icon is not displayed if there is no title.

Timeout

The maximum time in milliseconds for which the tooltip will be displayed. The tooltip may be displayed for a shorter time if another balloon tooltip is displayed by either the same or any other system tray icon.

The system enforces minimum and maximum timeout values. Timeout values that are too large are set to the maximum value and values that are too small default to the minimum value. The system minimum and maximum timeout values are set by the operating system and for all current version sof windows are 10 seconds and 30 seconds, respectively.

Events

The 'Events' panel shows events that are sent from the Notify Icon to the owner window. Typically these are mouse-related events, and can be triggered by moving and clicking the mouse on the Notify Icon.

v5.0 supports 2 behaviours for messages sent when the notify icon has keyboard focus and the <enter> and <space> key are pressed. The behavious can be changed by clicking the radio-buttons at the top of the 'Events' panel. See the microsoft documentation for 'Shell_NotifyIcon' for further details.

The text control at the bottom of the 'Events' panel shows the events as they happen.

v6.0 of shell32.dll support various additional event messages that occur as the balloon tooltip is displayed and hidden.

AUTHOR ^

Robert May - robertemay@users.sourceforge.net

COPYRIGHT AND LICENCE ^

This software is released under the same terms as Perl itself.

syntax highlighting: