怎样让程序延时

Q:怎样让程序延时

A:

procedure Delay(msecs:integer);

var
FirstTickCount:longint;

begin

FirstTickCount:=GetTickCount;
repeat
Application.ProcessMessages;
until ((GetTickCount-FirstTickCount) >= Longint(msecs));

end;



Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=3153


你可能感兴趣的:(程序)