[DELPHI] Programa dizendo hora exata e bom dia
XD Cheats :: Pc Zone :: Programação :: Delphi/ VB
Página 1 de 1
[DELPHI] Programa dizendo hora exata e bom dia
1° Adicione ao Form
2 Label
1 Timer
-> Mude o Interval do Timer para 1
Coloque o código no Timer:
Label1.Caption := TimeToStr(Time);
If (Label1.Caption >= '00:00:00') and (Label1.Caption <= '11:59:00') then begin
Label2.Caption := 'Bom dia!';
end else begin
If (Label1.Caption >= '12:00:00') and (Label1.Caption <= '17:29:00') then begin
Label2.Caption := 'Boa tarde!';
end else begin
If (Label1.Caption >= '17:30:00') and (Label1.Caption <= '23:59:00') then begin
Label2.Caption := 'Boa noite!';
end;
end;
end;
2 Label
1 Timer
-> Mude o Interval do Timer para 1
Coloque o código no Timer:
Label1.Caption := TimeToStr(Time);
If (Label1.Caption >= '00:00:00') and (Label1.Caption <= '11:59:00') then begin
Label2.Caption := 'Bom dia!';
end else begin
If (Label1.Caption >= '12:00:00') and (Label1.Caption <= '17:29:00') then begin
Label2.Caption := 'Boa tarde!';
end else begin
If (Label1.Caption >= '17:30:00') and (Label1.Caption <= '23:59:00') then begin
Label2.Caption := 'Boa noite!';
end;
end;
end;
Fenix- Programador
- Mensagens : 61
Data de inscrição : 20/02/2010
Idade : 27
Localização : Matinhos,PR
Tópicos semelhantes
» [DELPHI] Mensagem
» [DELPHI] Gerador aleatório
» Download Delphi 7 FULL
» [DELPHI]Botão que foge do Mouse
» [DELPHI] Nome do Form piscando
» [DELPHI] Gerador aleatório
» Download Delphi 7 FULL
» [DELPHI]Botão que foge do Mouse
» [DELPHI] Nome do Form piscando
XD Cheats :: Pc Zone :: Programação :: Delphi/ VB
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|