Hola yevabas.
Proba si este código realiza algo similar a lo que estas buscando:
Código Delphi
[-]
uses ... , ShellApi;
type
TForm1 = class(TForm)
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
FTitle: string;
FMinimized: Boolean;
procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND;
public
end;
...
implementation
var
Cont: Integer = 0;
procedure TForm1.FormCreate(Sender: TObject);
begin
FTitle := Application.Title;
FMinimized := False;
Timer1.Enabled := True;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Inc(Cont);
Caption := IntToStr(Cont);
if FMinimized then
Application.Title := IntToStr(Cont)
else
Application.Title := FTitle;
end;
procedure TForm1.WMSysCommand(var Msg: TWMSysCommand);
begin
FMinimized := Msg.CmdType = SC_MINIMIZE;
DefaultHandler(Msg)
end;
Saludos.
Edito: Modifiqué el título original de tu mensaje
"Caption" por el actual, ya que el anterior no reflejaba el contenido de tu consulta.