Hola Claudio1996, bienvenido a
Club Delphi
Como es costumbre con los nuevos miembros, te invitamos a leer nuestra
guía de estilo.
Código Delphi
[-]
uses Unit2;
var
Contador : Integer = 5;
procedure TForm1.FormCreate(Sender: TObject);
begin
Label1.Caption := '5';
with Timer1 do
begin
Enabled := False;
Interval := 1000; Enabled := True;
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Dec( Contador );
Label1.Caption := IntToStr( Contador );
if Contador = 0 then
begin
Timer1.Enabled := False;
if not Assigned( Form2 ) then
Form2 := TForm2.Create( Self );
Form2.Show; end
end;
Saludos