sleep函数的用法,大家帮我看看 sleep(5000);这时间一长就好像死机了是的,在delphi中有没有好的方法让sleep交出控制权。使用sleep的时候,程序还能响应其它的操作。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure Delay(ms : longint);var TheTime : LongInt;begin TheTime := GetTickCount + ms; while GetTickCount < TheTime do Application.ProcessMessages;end; procedure Delay(ms : longint);vari : integerbeginfor i=0 to ms dobeginApplication.ProcessMessages;Sleep(1);end;end; 如果在服务器上运行,就要考虑GetTickCount的溢出问题!! 有没有字符串模糊匹配函数? DELPHI的Abstract Error 在刚安装完delphi5后,第一次运行时弹出下面的对话框:You just-in-time debugger is currently se 超简单问题! 数据库查询出来后要使数据相同的就只显示一个呢 svchost.exe文件是什么东东,怎么我的电脑提示错误!! toolbar 为什么会这样子 100分散尽求dxdbgrid的好朋友....欢迎交流.... 数学符号“ ψ ”怎么读? delphi2007下系统托盘的控件是哪个? 后台执行但是在任务栏隐藏 Delphi+Access+ADO能负担多大的并发查询呢?
var
TheTime : LongInt;
begin
TheTime := GetTickCount + ms;
while GetTickCount < TheTime do
Application.ProcessMessages;
end;
var
i : integer
begin
for i=0 to ms do
begin
Application.ProcessMessages;
Sleep(1);
end;
end;