public
nrIco : Integer;
MinIcon : array[0..1] of TIcon;
...
procedure TfrMain.FormCreate(Sender: TObject);
begin
MinIcon[0]:=TIcon.Create;
MinIcon[1]:=TIcon.Create;
MinIcon[0].Handle:=LoadIcon(hInstance,'ICOOK');
MinIcon[1].Handle:=LoadIcon(hInstance,'ICOFOLD');
NrIco:=0;
Timer1.Interval:=200;
end;
...
procedure TfrMain.Timer1Timer(Sender: TObject);
begin
if IsIconic(Application.Handle) then begin
NrIco:=(NrIco+1) mod 2;
Application.Icon:=MinIcon[NrIco];
end;
end;
...
procedure TfrMain.FormDestroy(Sender: TObject);
begin
MinIcon[0].Free;
MinIcon[1].Free;
end;