Hi,
versuch mal etwas in dieser Art in einem in der
dpr vor Application.Run; (aus einem alten Tutorial, läuft zumindest unter Intraweb 10):
Delphi-Quellcode:
Application.Icon.LoadFromFile('files/appicon-large.ico');
formIWMain.Icon.LoadFromFile('files/appicon-small.ico');
formIWMain.FIconData.hIcon := formIWMain.Icon.Handle;
for i := 0 to Pred(formIWMain.ComponentCount) do begin
if formIWMain.Components[i] is TMenuItem then begin
with FormIWMain.Components[i] as TMenuItem do begin
if Caption = 'Run in Tray icon' then begin
if Checked then begin
formIWMain.FreeTrayIcon;
formIWMain.CreateTrayIcon;
end;
System.Break;
end;
end;
end;
end;