Delphi-Quellcode:
procedure TForm1.WMSysCommand(var Message: TWMSysCommand);
begin
if Message.CmdType and $FFF0 = SC_MINIMIZE then
begin
Hide;
Shell_NotifyIcon(NIM_DELETE, @IconData);
end
else
inherited;
end;
Probier mal das(hoffe ich habs richtig verstanden)