proceudre tform1.timer1timer(sender:tobject); begin if timetostr(now())='12:00:00'then begin //do something; end; end;
begin if timetostr(now())='12:00:00' then begin showmessage '到下班的时间了!' end;end;
procedure TForm1.Timer1Timer(Sender: TObject); begin if (Time() >= StrToTime("12:00:00")) and (Time() < StrToTime("12:01:00")) then begin ShowMessage('下班了。'); Timer1.Enabled = false; end; end;
proceudre tform1.timer1timer(sender:tobject); begin if timetostr(now())='12:00:00'then begin //do something; end; end;
begin
if timetostr(now())='12:00:00'then
begin
//do something;
end;
end;
if timetostr(now())='12:00:00' then
begin
showmessage '到下班的时间了!'
end;end;
begin
if (Time() >= StrToTime("12:00:00")) and (Time() < StrToTime("12:01:00")) then
begin
ShowMessage('下班了。');
Timer1.Enabled = false;
end;
end;
begin
if timetostr(now())='12:00:00'then
begin
//do something;
end;
end;