procedure TForm1.Button1Click(Sender: TObject); var MySystemeTime:TSystemeTime; begin with MySystemeTime do begin wYear:=2002; wMonth:=10; wDay:=23; wHoure:=12; wMinute:=23; wSecond:=21; end; SetSystemTime(MySystemeTime); Application.MessageBox('系统时间已设定','提示',MB_OKCANCEL); end;
procedure tform1.button1click(sender:tobject); var timestr:string; begin storedproc1.prepare; storedproc1.execproc; timestr:=storedproc1.parambyname('@dt').asstring; storedproc1.unprepare; storedproc1.close; messagedlg(timestr,mtinformation,[mbyes,mbno],0); end;
var
MySystemeTime:TSystemeTime;
begin
with MySystemeTime do
begin
wYear:=2002;
wMonth:=10;
wDay:=23;
wHoure:=12;
wMinute:=23;
wSecond:=21;
end;
SetSystemTime(MySystemeTime);
Application.MessageBox('系统时间已设定','提示',MB_OKCANCEL);
end;
var
timestr:string;
begin
storedproc1.prepare;
storedproc1.execproc;
timestr:=storedproc1.parambyname('@dt').asstring;
storedproc1.unprepare;
storedproc1.close;
messagedlg(timestr,mtinformation,[mbyes,mbno],0);
end;