当前位置:主页>销售管理软件> 列表

bho 获取 ie 地址栏 找工程档案管理软件

进销存软件版1楼: 在 bho 里怎样获取 ie 地址栏的 URL 数据?

2楼: 有些会保存到注册表 如工程档案管理软件

3楼: 这里:HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs

4楼: procedure TForm1.Button1Click(Sender: TObject);
var
ShellWindow: IShellWindows;
nCount: integer;
spDisp: IDispatch;
i: integer;
vi: OleVariant;
IE1: IWebBrowser2;
IDoc1: IHTMLDocument2;
begin
ShellWindow := CoShellWindows.Create;
nCount := ShellWindow.Count;

for i := 0 to nCount - 1 do
begin
vi := i;
spDisp := ShellWindow.Item(vi);
spDisp.QueryInterface( iWebBrowser2, IE1 );
if IE1 <> nil then
begin
memo1.Lines.Add( ''Location: ''+ie1.LocationName );

IE1.Document.QueryInterface(IHTMLDocument2,iDoc1);
if iDoc1 <> nil then
begin
memo1.Lines.add( ''Title: '' + IDOC1.Title );
memo1.Lines.add( ''Url: '' + IDOC1.url);
end;
end;
end;
end;

5楼: 路过,学习。

6楼: bho不是传给你IWebbrowser2了吗?读取Iwebbrowser2的LocationURL就是你要的东西了.

进销存软件版7楼: 因为没有这方面的资料,现在可以了,谢谢各位帮忙