logo
vbRad Home
Source Code
Book Reviews
Forum
Links
About Us
Contribute

Compare Databases with SQL Effects Clarity
 
 Free Tray Icon Control

Posted on
2/18/2001
Author:
Robert Gelb
Email:
Not Shown
Applies To OS:
NT, 9x, 2000
Product:
5, 6



Now and then it is useful to place an app in the system tray.  This control let's you add multiple icons to the system tray, it let's you add, modify and remove the icons and tooltip on demand.  It also let's you animate the icon in the system tray.  The control exposes the following events:  MouseMove, MouseDown, Click and DoubleClick events.  MouseUp event is not exposed because as far as the tray icon is concerned it is the same as Click event.

The control has the following methods:  Start, Modify and Remove.  As you might guess Start tells the conrol to show the tray icon.  Modify makes whatever modifications you need like changing the icon or tooltip.  Remove gets rid of the system tray icon.

Supplied with the downloadable control is demo program that shows how to create a simple tray icon (1 line of code), modify it (2 lines of code), remove it (one line of code), setup an animation, stress test the entire system tray and other goodies

Tray Image Screen Shot 1 Tray Image Screen Shot 2

Download TrayIconControl.zip

Updated on 11-05-2000. Thanks to Peter Smith for pointing out a typo in constants and a bug with application focus in the MouseMove event.

 


Add Your Comment  

Name: Email Address: all fields optional
Notify me via email when someone responds to this message (valid email required).

Enter the word: