N
nakoka
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure delay(MSecs:longint);
var
firstTickCount, Now: Longint;
begin
firstTickCount := GetTickCount;
repeat
application.ProcessMessages;
Now := GetTickCount;
until (now - firstTickCount >=MSecs) or (Now < FirstTickCount);
end;
比如我想在form1.create事件里延时1000毫秒后form1关闭。应该怎么搞?
var
firstTickCount, Now: Longint;
begin
firstTickCount := GetTickCount;
repeat
application.ProcessMessages;
Now := GetTickCount;
until (now - firstTickCount >=MSecs) or (Now < FirstTickCount);
end;
比如我想在form1.create事件里延时1000毫秒后form1关闭。应该怎么搞?