Procedure TFrmGControl.Delay(MSecs:Longint);<br>var<br> FirstTickCount,Now:Longint;<br>begin<br> FirstTickCount:=GetTickCount;<br> Repeat<br> Application.ProcessMessages;<br> Now:=GetTickCount;<br> Until (Now-FirstTickCount>=MSecs) or (Now<FirstTickCount);<br>end;<br><br>现成的。