RSS订阅 | 匿名投稿
您的位置:网站首页 > 时间 > 正文

delphi 設置系統時間

作者:admin 来源: 日期:2013/10/30 11:18:21 人气: 标签:

function SetSystemtime(ATime: TDateTime): Boolean;
var
ADateTime: TSystemTime;
yy, mon, dd, hh, min, ss, ms: Word;
begin
decodedate(ATime, yy, mon, dd);
decodetime(ATime, hh, min, ss, ms);
with ADateTime do
begin
wYear := yy;
wMonth := mon;
wDay := dd;
wHour := hh;
wMinute := min;
wSecond := ss;
wMilliseconds := ms;
end;
Result := SetLocalTime(ADateTime);
SendMessage(HWND_BROADCAST, WM_TIMECHANGE, 0, 0);
end;
读完这篇文章后,您心情如何?
0
0
0
0
0
0
0
0
本文网址: