C cslegend Unregistered / Unconfirmed GUEST, unregistred user! 2001-06-18 #1 有哪位大侠知道怎样改变计算机系统时间(即改变NOW的值)。
T TYZhang Unregistered / Unconfirmed GUEST, unregistred user! 2001-06-18 #2 procedure TForm1.SetDate(Date: TDateTime); Var D:TSystemTime; Year,Month,Day:Word; begin Try DecodeDate(Date,Year,Month,Day); GetSystemtime(D); D.wYear:=Year; D.wMonth:=Month; D.wDay:=Day; SetSystemTime(D); Except end; end;
procedure TForm1.SetDate(Date: TDateTime); Var D:TSystemTime; Year,Month,Day:Word; begin Try DecodeDate(Date,Year,Month,Day); GetSystemtime(D); D.wYear:=Year; D.wMonth:=Month; D.wDay:=Day; SetSystemTime(D); Except end; end;