procedure TForm1.Button1Click(Sender: TObject);<br>var<br> hCurWindow:HWnd;<br> Text: string;<br> i:Integer;<br>begin<br> hCurWindow:=GetWindow(Handle,GW_HWNDFIRST);<br> while hCurWindow <> 0 do<br> begin<br> SetLength (Text, 100);<br> i:=GetClassname(hCurWindow,pchar(text),100);<br> if copy(text,1,i)='IEFrame' then<br> begin<br> i:=GetWindowText(hCurWindow,pchar(text),100);<br> Memo1.Lines.Add(copy(text,1,i)+' '+#13+#10+'句柄'+IntToStr(hCurWindow));<br> end;<br> hCurWindow:=GetWindow(hCurWindow,GW_HWNDNEXT);<br> end;<br>end;