如何修改系统时间(用Delphi1+windows3.1)?(100分)

  • 主题发起人 主题发起人 ijk88
  • 开始时间 开始时间
I

ijk88

Unregistered / Unconfirmed
GUEST, unregistred user!
如何修改系统时间(用Delphi1+windows3.1)?
 
看看这个函数行不行:SetLocalTime()<br>要例子吗?给我Email:<br>rjzsoft@hotmail.com
 
用内部命令date和time好了^_^
 
SetLocalTime<br><br>SetSystemTime <br><br>eg:<br>procedure TForm1.Button1Click(Sender: TObject);<br>var MyST:TSystemTime;<br>begin<br>&nbsp; &nbsp;MyST.wYear:=2000;<br>&nbsp; &nbsp;MyST.wMonth:=4;<br>&nbsp; &nbsp;MySt.wDay:=1;<br>&nbsp; &nbsp;MySt.wHour:=17;<br>&nbsp; &nbsp;MySt.wMinute:=20;<br>&nbsp; &nbsp;MySt.wSecond:=20;<br>&nbsp; &nbsp;if SetSystemTime(MyST) then ShowMessage('Change successfully')<br>&nbsp; &nbsp;else ShowMessage('Change failed');<br>end;<br>
 
查systemtime
 
[:)]各位兄弟,要看清问题,在win31下的API和95/98/2000的不一样.<br>我用汇编写了一个:请指教:(呵呵)<br><br>function SetDate(Y:word;M,D:Byte): boolean;<br>Var jg:byte;<br>begin<br>&nbsp; asm<br>&nbsp; &nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp; AH,2BH<br>&nbsp; &nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp; CX,Y<br>&nbsp; &nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp; DH,M<br>&nbsp; &nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp; DL,D<br>&nbsp; &nbsp; &nbsp; &nbsp; INT &nbsp; &nbsp; 21H<br>&nbsp; &nbsp; &nbsp; &nbsp; MOV &nbsp; &nbsp; jg,Al<br>&nbsp; end;<br>&nbsp; if &nbsp;jg=0 then &nbsp;Result:=true else &nbsp;Result:=false;<br>end;
 
后退
顶部