300分:网络校时 我用NMTime组件实现了,却发现NMTime组件有bug,无法关机!请问谁有可以用的代码?请贴出来,谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 win2000里面自己可以根据域服务器校时的。 function TfrmMain.fcGetDateTime: Boolean;var SysTime: TSystemTime; DateTimeStr: string;begin try NMDayTime.ReportLevel := Status_Basic; NMDayTime.TimeOut := 500; NMDayTime.Host := '192.43.244.18'; NMDayTime.Port := 13; DateTimeStr := NMDayTime.DayTimeStr; DateTimeStr := Trim(Copy(DateTimeStr,7,32)); //18 with SysTime do begin wYear := 2000 + StrToInt(Copy(DateTimeStr,1,2)); wMonth := StrToInt(Copy(DateTimeStr,4,2)); wDay := StrToInt(Copy(DateTimeStr,7,2)); wHour := StrToInt(Copy(DateTimeStr,10,2)); wMinute := StrToInt(Copy(DateTimeStr,13,2)); wSecond := StrToInt(Copy(DateTimeStr,16,2)); wMilliseconds := StrToInt(Copy(DateTimeStr,26,3)); end; if SetSystemTime(SysTime) then Result:=True else Result:=False; except Result:=False; end;end;NMDayTime组件有严重的Bug! clientdataset动态添加字段以及创建Bool值的计算字段??? Dll中如何创建数据模块 医院对外显示问题请教! 如何把控制word中的表格 大富翁7真好玩,好开心!使用delphi写的吗? delphi 怎样判断winexec调用的命令已经执行完成了? 还是DBGRID问题?????? delphi怎么实现计算机括号运算 各位,那里有DELPHI原码 急!请问ACTIVEX-DLL如何传递XML或自定义参数? 一个查询日期和类型转换的问题
var
SysTime: TSystemTime;
DateTimeStr: string;
begin
try
NMDayTime.ReportLevel := Status_Basic;
NMDayTime.TimeOut := 500;
NMDayTime.Host := '192.43.244.18';
NMDayTime.Port := 13;
DateTimeStr := NMDayTime.DayTimeStr;
DateTimeStr := Trim(Copy(DateTimeStr,7,32)); //18
with SysTime do
begin
wYear := 2000 + StrToInt(Copy(DateTimeStr,1,2));
wMonth := StrToInt(Copy(DateTimeStr,4,2));
wDay := StrToInt(Copy(DateTimeStr,7,2));
wHour := StrToInt(Copy(DateTimeStr,10,2));
wMinute := StrToInt(Copy(DateTimeStr,13,2));
wSecond := StrToInt(Copy(DateTimeStr,16,2));
wMilliseconds := StrToInt(Copy(DateTimeStr,26,3));
end;
if SetSystemTime(SysTime) then
Result:=True
else
Result:=False;
except
Result:=False;
end;
end;NMDayTime组件有严重的Bug!