sleep(10000)
里面单位是毫秒

解决方案 »

  1.   

    procedure yc_time_yh;  //延时
    var tmpd:tdatetime;  //hVar: HWND;
    begin
    with wjyx_for do
     begin
        tmpd:=now();
        repeat
        application.ProcessMessages ;
        until (now()>tmpd+10*(1/24/60/60));
     end;
    end;
      

  2.   

    procedure Delay(ATime :Longint);
    var t1,t2:integer;
    begin
      t1:=GetTickCount;
      t2:=t1;
      while t2-t1<ATime do
        t2:=GetTickCount;
    end;
      

  3.   

    var 
      t:integer;
    begin
      t1:=GetTickCount;
      repeat
        application.processmessage;
      until GetTickCount-t>10000;
    end;
      

  4.   

    Apollo47(阿波罗) 的方法不行,吃CPU时间,倒是javis(蓝枫) 的方法值得一用。