本文整理自网络,侵删。
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 学习 sql 语句 - select(9): 其他
Delphi twebbrowser:确定带有框架的页面何时完成
Delphi winapi: windowfrompoint- 获取指定点所在窗口的句柄
更多相关阅读请进入《Delphi》频道 >>