Files
SignauxComplexes/UnitInfo.pas
2026-01-17 11:19:04 +01:00

52 lines
935 B
ObjectPascal

unit UnitInfo;
// affiche une info dans le TCO
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TFormInfo = class(TForm)
Timerinfo: TTimer;
LabelInfo: TLabel;
procedure TimerinfoTimer(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
FormInfo: TFormInfo;
TickInfo : integer;
implementation
{$R *.dfm}
procedure TFormInfo.TimerinfoTimer(Sender: TObject);
begin
if TickInfo>0 then
begin
dec(TickInfo);
if TickInfo=0 then close;
end;
end;
procedure TFormInfo.FormActivate(Sender: TObject);
begin
TickInfo:=5; // temps de fermeture de la fenetre pour le timer
end;
procedure TFormInfo.FormCreate(Sender: TObject);
begin
labelInfo.Width:=formInfo.Width-20;
end;
end.