解决方案 »

  1.   

    while Integer(found) <> 0 then
      

  2.   

    能完善点吗,为何写then不写DO
      

  3.   

    procedure TForm1.Button1Click(Sender: TObject);
     var
      found : boolean;
      Num: Cardinal;
      NewItem: TlistItem;
     begin
       while found do
         begin
         Ghwnd:= FindWindowEx(Ghwnd,0,'TXGuiFoundation',nil);
         if Ghwnd > 0 then
          begin
          NewItem := ListView1.Items.Add;   //在ListView1显示
          NewItem.Caption:='QQ';
          end
         else
          begin
          break; //符合条件打断
        end;
      end;
    end;
    求助~~
      

  4.   


    写错了!应该是while Integer(found) <> 0 do 这个没问题!就在你上面的程序上改成这个就可以了!
      

  5.   

    谢谢关注 问题解决了
    问题出现到这句Ghwnd :=FindWindow('TXGuiFoundation', 'QQ2013');
     正确写法Ghwnd:= FindWindowEx(0,Ghwnd,'ElementClient Window',nil);
    以前我用4#楼写法