I created a nice and very simple piece of code for a trayicon interface to be used in very small applications. (It still depends on some VCL units but hey, a console application with this unit will still be smaller than 60 KB.)
I fear, however, that there are quite a few minor flaws in this code, so I need volunteers to play around with it, to spot errors and provide solutions. The sourcecode is at http://www.workshop-alex.org/Sources/TrayIcon/untTrayIconThread.html
if you're interested.
There will be 100 points for a real major bug, 50 points for minor bugs and 20 points for nice suggestions. No more than 500 points will be given away, though, and those who spot bugs first will be the first to receive points. (But hey, feel free to continue making suggestions.) You yourself should describe if it's a major bug, minor bug or just a suggestion and I will check if you're right.
Oh, I know this trayicon object doesn't have much functionality. This is on purpose, since it's supposed to be used for debugging purposes only for other application. I would enable the debug mode in some way and the trayicon would provide me a way to make dumps of the internal process whenever I want to dump them. Of course, it could be made into a much more interesting thing or even a component, but for me it's extremely important that it doesn't need too much additional overhead.
Usage of this thing in e.g. a console application:
untTrayIconThread in 'untTrayIconThread.pas',
untExtraInterfaces in 'untExtraInterfaces.pas';
TDummy = class
Dummy := TDummy.Create;
TrayIcon := NewTrayIcon( 'TestAppA', 'Just a simple test.' );
TrayIcon.AddTrayAction( 'Hello', Dummy.SayHello );
TrayIcon.AddTrayAction( 'Bye', Dummy.SayBye );
TrayIcon.Suspended := False;
WriteLn( 'Press <Enter> to quit. ' );
TrayIcon := nil;
Feel free to give any comments about it that you like.
And if you feel this code has been useful for you, don't hesitate to provide positive feedback in my member profile. ;-)