(Gast)
n/a Beiträge
|
Re: PC-Datum und Zeit ändern ?
15. Mai 2008, 11:10
Delphi-Quellcode:
procedure TForm1.Button4Click(Sender: TObject);
var
SystemTime: TSystemTime;
NewTime, NewDate: string;
begin
NewTime := '00:00:00';
NewDate := '15.05.2008';
DateTimeToSystemTime(StrToDate(NewDate) + StrToTime(NewTime), SystemTime);
SetLocalTime(SystemTime);
// Tell windows, that the Time changed!
PostMessage(HWND_BROADCAST, WM_TIMECHANGE, 0, 0); // *
end;
|
|
|