G
GODOSO
Unregistered / Unconfirmed
GUEST, unregistred user!
需实现修改系统时间增加40-50分钟,源代码我是这样写得,但是就是通不过,请大大们看看是哪里出错了.ps:我是新手,请尽量解释详细为盼.谢谢!
var
a:integer;
MyTime:Tdatetime;
begin
randomize; //初始化随机数
a:= 2400+Random(600);
myTime:=now();
MyTime:=IncSecond(MyTime,a);
ShowMessage(datetimetostr(mytime));
SetLocalTime(datetimetosystemtime(MyTime));
end;
var
a:integer;
MyTime:Tdatetime;
begin
randomize; //初始化随机数
a:= 2400+Random(600);
myTime:=now();
MyTime:=IncSecond(MyTime,a);
ShowMessage(datetimetostr(mytime));
SetLocalTime(datetimetosystemtime(MyTime));
end;