核心提示:部分代码:procedure TForm1.GetBrowsersButtonClick(Sender: TObject) ;var ShellWindows: TShellWindows; Shel...
部分代码:
procedure TForm1.GetBrowsersButtonClick(Sender: TObject) ;
var
ShellWindows: TShellWindows;
ShellWindowDisp: IDispatch;
WebBrowser: IWebbrowser2;
Count: integer;
begin
BrowserList.Clear;
ShellWindows := TShellWindows.Create(nil) ;
try
for Count := 0 to ShellWindows.Count - 1 do
begin
ShellWindowDisp := ShellWindows.Item(Count) ;
if ShellWindowDisp = nil then Continue;
ShellWindowDisp.QueryInterface(iWebBrowser2, WebBrowser) ;
if WebBrowser.LocationURL = '' then Continue;
if Assigned(WebBrowser.Document) then
BrowserList.Items.Add(WebBrowser.LocationURL) ;
end;
finally
ShellWindows.Free;
end;
end;
全部代码已经打包下载
迅雷专用高速下载