Unit TrayIcon |
TTrayIcon VCL. Version 1.3 Requires: Delphi 2.0 32 bit. Function: Adds an icon to the Windows 95 Tool Tray and has events to respond to mouse clicks. This component is based on the TToolIcon VCL that was written by Derek Stutsman (dereks@metronet.com). He based his component on TWinControl, so it showed up as a clear, blank, resizable window at design time and also had more properties than the component actually needed. This made it really hard to find on a busy form sometimes. I changed it so it would be based on TComponent so that it was readily visible at design time and also did not cover anything at run-time. The additional Top, left, width, etc. properties are also no longer necessary. I added a ShowDesigning property so that you could test it at design time, but then turn it off so that TWO icons weren't shown on the tool tray when developing and testing. One strange anomaly that I worked around but don't know why it happens - if a ToolTip is not specified, then at run-time the icon shows up as blank. If a ToolTip is specified, everything works fine. To fix this, I set up another windows message that set the tool tip if it was blank - this ensures proper operation at all times, but I don't know why this is necessary. If you can figure it out, send me some mail and let me know! (4/17/96 note - still no solution for this!) This is freeware (as was the original). If you make cool changes to it, please send them to me. Enjoy! Pete Ness Compuserve ID: 102347,710 Internet: 102347.710@compuserve.com http:\\ourworld.compuserve.com\homepages\peteness Release history: 3/8/96 - Version 1.0 Release by Derek Stutsman of TToolIcon version 1.0 3/12/96 - Version 1.1 Changed as outlined above by me (Pete Ness) and renamed to TTrayIcon. 3/29/96 - Version 1.2 Add default window handling to allow closing when Win95 shutdown. Previously, you had to manually close your application before closing Windows 95. 4/17/96 - Version 1.3 Added a PopupMenu property to automatically handle right clicking on the tray icon. Fixed bug that would not allow you to instantiate a TTrayIcon instance at run-time. Added an example program to show how to do some of the things I've gotten the most questions on. This version is available from my super lame web page - see above for the address.
Classes |
Functions |
Register - Handle all messages with the default handler
Types |
Constants |
WM_RESETTOOLTIP
WM_TOOLTRAYICON
Variables |
Functions |
Types |
Constants |
Variables |