本文整理自网络,侵删。
Procedure TForm1.Delay(Msecs: Integer);
var FirstTickCount: real;
begin
FirstTickCount:= GetTickCount;
Repeat
Application.ProcessMessages;
Until ((GetTickCount - FirstTickCount) >= LongInt (Msecs));
end;
程序调用:Delay(500);
在DelphiXE10.1中直接使用没问题。
相关阅读 >>
Delphi 调用浏览文件夹 selectdirectory
indy 中idhttp元件出现http status 302错误
Delphi 设置webbrowser 代理服务器 与 useragent
Delphi xe6开发的android应用实现在线升级完成后自动安装apk代码(加说明)
Delphi之tclientsocket和tserversocket使用tcp keepalive心跳机制实现“断网”、"断电"检测
更多相关阅读请进入《Delphi》频道 >>