delphi 設置系統時間


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;
联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678