I recently discovered the TTrayIcon component in Delphi 2007. The code used is pretty simple.
procedure TForm1.FormCreate(Sender: TObject); begin AppTrayIcon := TTrayIcon.Create(nil); AppTrayIcon.OnDblClick := OnAppTrayIconDblClick; Application.OnMinimize := OnApplicationMinimize; Application.OnRestore := OnApplicationRestore; end; procedure TForm1.OnApplicationRestore(Sender: TObject); begin AppTrayIcon.Visible := False; ShowWindow(Application.Handle, SW_SHOW); Application.BringToFront; end; procedure TForm1.OnApplicationMinimize(Sender: TObject); begin AppTrayIcon.Visible := True; ShowWindow(Application.Handle, SW_HIDE); end; procedure TForm1.OnAppTrayIconDblClick(Sender: TObject); begin Application.Restore; end;
Since there is no icon assigned, Delphi uses Application.Icon, which is this icon: http://artbyloveland.com/icon.ico This icon contains the following sizes: 64x64, 48x48, 32x32, 24x24 and 16x16.
Now, on my Windows Vista, everything is fine.
On non-thematic Windows, such as Windows Server 2003, the result is spoiled:

EDIT: At first I thought it was due to the alpha channel. So I tried to make the ico file version without using the alpha channel. I also tried the GreenFish icon editor suggested by Ken; I selected every color depth and every available size. In both cases, the end result is better. However, there is a black stroke that does not exist at all in the ico file.

delphi alpha blur tray
Allain mccain
source share