TrayIcon Component

Although no source is included, this component is FREEWARE!

Copyright 1996, Enigma Technologies, All Rights Reserved.

Disclaimer
This component and it's associated files can be freely used and distributed in commercial and private environments, provided this notice is not modified in any way without my expressed written consent.  This Component is released as is.  No warranty is expressed or implied and I am not  responsible for any problems that might arise from the use and/or misuse of this component.  You use this component entirely at your own risk.  

Component Name:
TTrayIcon
Version:
1.1 Official Release
Author:
David McWhirter
Created on:
01/27/1996
Last Modified:
04/10/1996

Description:
Allows Delphi 1.0 Applications to use an Icon in the Windows95 System Tray.
(If anyone would like to donate a legal copy of Delphi 2.0 Developer, I'd be happy to convert TTrayIcon over to 2.0!)

Notes:
	Requires Call32NT and (obviously) Windows95.  
	This has only been tested on Windows95.  

Files:	
* TRAYICON.DCU	The compiled component file.
* TRAYICON.DCR	The component Resource file
* 16x16.ICO	A 16x16 Icon template for use with Delphi's Image Editor
* TRAYICON.DOC	Documentation (This File!) Word 6.0 Format
* TRAYICON.TXT	Documentation (This File!) Text Format

Installation Instructions:	
Copy TRAYICON.DCU and TRAYICON.DCR to your component directory.  Select Options/Install Components and Add the File TRAYICON.DCU to your Component List.  That's it!

Documentation:
Using this component is very simple...  It consists of the following:

Properties:

Enabled:	Specifies whether to put icon in toolbar or not.  If you Enabled it during your development in the IDE and then choose to run the application, you may get two icons in the task bar.  Nothing to worry about.  It just means that the form you were using in development mode has not actually been destroyed, or to be more specific, the TTrayIcon component that is on the form in the IDE has not been destroyed because the form has not been destroyed.
Icon:	The icon you want to use.  I am using the standard icon and
	letting the OS convert it to the smaller version.  It was much
	than trying to support the smaller icon that is available with 
	Win95.  However, I have included an icon called 16x16.ICO which you can use as a template for a true 16x16 icon.  I haven't tested this in depth, only to the point that I know it works.  
Name:	The name of the component.
Tip:	The tip that shows when your mouse is over the icon in the tray.  This is limited in length to 64 characters.  (This is a limitation set by Win95 Taskbar API)

Events:
	OnClick
	OnDblClick
	OnMouseDown
	OnMouseUp

In most cases, you would probably just want to call a pop-up window from the OnClick Event.  Doing this is very easy.  The Mouse events are defined as TMouseEvent, thus, giving you the X and Y coordinates for the pop-up menu to be displayed.  

There really isn't much more to it than that.
Future Plans:
* If there is much demand for it, I may add a pop-up menu property.  If I do, I will more than likely define one for the Right and Left Mouse Button.  (Only 1 person has even commented on this.)
* There was a request to put a Hide property on the TTrayIcon component.  This doesn't feel right.  I intend to make another component to do this task.  I should release it shortly.
* I have thought about giving this component to store more than one icon, if anyone has any ideas, PLEASE let me know. 
Special Thanks
I'd like to thank Bartek Antosik <ban@scs.amp.pw.edu.pl> for pointing out some details on the 16x16 icon supported by Win95.  I was just too lazy to look into it
I'd also like to thank everyone who has emailed their comments and suggestions to me.  It's nice to hear what you have to say!
Known Problems:
* No major problems reported yet.
Version History:	
1.1 Official Release	04/10/1996
* Fixed the problem allowing only 1 TrayIcon per form.  You can now have as many as you wish.  (uh.. A reasonable amount)  This was caused by the way I was capturing the messages sent by the Icon on the System Tray.  I was wedging into the form's Message handler and although it worked, it was a bit sloppy.  I have resolved this know and each instance of TTrayIcon now captures it's own messages and needs to know nothing about a form.
* No longer need to avoid using WM_USER+100 for capturing messages on the form.  There will be no conflicts with the TrayIcon component using Window Messages on any other component.
* Added a 16x16 Icon file to be used as a template.  Fortunately, the image editor will edit Icon files of that dimension, but not create them.  What you need to do is open the 16x16.ICO file and save it to the icon file you want to use and it will work just fine for editing, etc.  
* Clean up some inconsistent property methods.  (Worked fine, I just didn't like them as they were.)
* Included a sample application to show some of this components potential.
* There were no major problems from version 1.0 Beta.  (Whew!)
1.0 Beta	01/27/1996
* Initial Release
Contact Information:
Latest Updates can be found on http://www.deltanet.com/users/davidmc/

Please email any bugs and/or suggestions to: davidmc@deltanet.com
