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 listview基本用法大全

Delphi 检查当前用户权限

Delphi 运行中申请uac权限

Delphi twebbrowser静音

Delphi 学习 sql 语句 - select(9): 其他

Delphi twebbrowser:确定带有框架的页面何时完成

Delphi jpeg图片压缩

Delphi 获取其他进程句柄的几种方法

Delphi的idhttp的基本用法

Delphi winapi: windowfrompoint- 获取指定点所在窗口的句柄

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



打赏

取消

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

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

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

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

评论

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