来一个搜索循环啊!
query1.open;
  query1.first;
    for i:=0 to query1.RecordCount do
    begin
   // ...在这里如何等到外部一变量wb传回true时才让他执行? //此处如何做?
   //   比如在此等候10秒,才继续执行                  
    While True
    begin
      //接收消息
      Application.ProcessMessages;
      if wb then break;
      //睡眠0.1秒
       Sleep(100);
    end;      
    if wb=true then 
    begin    end;    next;
  end;

解决方案 »

  1.   

    我的建议:
       去掉 Sleep,一样可以实现功能.
    复贴子: 
     回复人:WuHeHai(河海) (2001-5-4 16:22:00)  得0分 
    来一个搜索循环啊!
    query1.open;
      query1.first;
        for i:=0 to query1.RecordCount do
        begin
      // ...在这里如何等到外部一变量wb传回true时才让他执行? //此处如何做?
      //  比如在此等候10秒,才继续执行                  
        While True do
        begin
          //接收消息
          Application.ProcessMessages;
          if wb then break;
          //睡眠0.1秒
          //Sleep(100);
        end;      
        //if wb=true then 
        begin    end;    next;
      end;