delphi 延时程序


本文整理自网络,侵删。

 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延时4种方法

Delphi 调用浏览文件夹 selectdirectory

indy 中idhttp元件出现http status 302错误

Delphi 设置webbrowser 代理服务器 与 useragent

Delphi 获取时间日期

Delphi 系统服务和普通forms程序共存一体的实现

Delphi里实现获取资源管理器路径以及ie打开网址列表

Delphi xe6开发的android应用实现在线升级完成后自动安装apk代码(加说明)

Delphi判断字符串中是否包含汉字,并返回汉字位置

Delphi之tclientsocket和tserversocket使用tcp keepalive心跳机制实现“断网”、"断电"检测

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...