用sleep太武断,正个程序全部停止了,建议用
procedure wait(MillisecondsWORD);
var tempWORD;
begin
temp:=GetTicketCount;
while not GetTicketCount-temp<Milliseconds do
Application.ProcessMessages;
end;
procedure wait(MillisecondsWORD);
var tempWORD;
begin
temp:=GetTickCount;
while GetTickCount-temp<Milliseconds do
Application.ProcessMessages;
end;
这样才行