// Flashing (blinking) application window caption bar, in order to get user attention
object Form1: TForm1
Caption = 'Form1'
object Button1: TButton
Caption = 'Flash On'
OnClick = Button1Click
end
object Timer1: TTimer
Enabled = False
Interval = 100
OnTimer = Timer1Timer
end
end
// ********************************************* //
procedure TForm1.Button1Click(Sender: TObject);
// ********************************************* //
begin
if TButton(Sender).Caption='Flash On' then
begin
beep;
TButton(Sender).Caption:='Flash Off';
Timer1.Enabled:=true;
end
else
begin
TButton(Sender).Caption:='Flash On';
Timer1.Enabled:=False;
end;
end;
// ********************************************* //
procedure TForm1.Timer1Timer(Sender: TObject);
// ********************************************* //
begin
FlashWindow (Handle, True) ;
end;