FormatDateTime('"The meeting is on " dddd, mmmm d, yyyy, " at " hh:mm AM/PM', Now) 要实现你所说的功能只要用Timer不超过一小时判断一次 if mytime = now.gethour then ...未经测试,不过思想就是这样,不过不行只要稍作修改就行
自己解决了procedure TForm1.Timer1Timer(Sender: TObject); var Hour, Min, Sec, MSec: Word; begin DecodeTime(now, hour, min, Sec, MSec); if min < 10 then showmessage('1') else showmessage('2'); end;
要实现你所说的功能只要用Timer不超过一小时判断一次
if mytime = now.gethour then ...未经测试,不过思想就是这样,不过不行只要稍作修改就行
var Hour, Min, Sec, MSec: Word;
begin
DecodeTime(now, hour, min, Sec, MSec);
if min < 10 then showmessage('1')
else showmessage('2');
end;