如何得到ie地址栏中的内容

newstar2002 2003-04-30 08:37:32
如何得到ie地址栏中的内容
var
ProcessHandle : THandle;
ProcessID: Integer;
h:THandle;
d:THandle;
begin
h:=findwindow('IEFrame',0);
d:=FindWindowEx(d,0,'ComboBox','""');
label1.Caption :=inttostr(d);
连句柄都得不到
l
...全文
74 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yanpinghui 2003-05-01
  • 打赏
  • 举报
回复
http://www.jxyc.gov.cn/leida/bbs论坛过这个问题..
qiqi97 2003-04-30
  • 打赏
  • 举报
回复
如果只是获取IE的地址

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,DDEman;

type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
DDE:TDdeClientConv;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
if DDE.SetLink('Iexplore', 'WWW_GetWindowInfo') then
begin
DDE.OpenLink;
Edit1.Text:=DDE.RequestData('-1');
DDE.CloseLink;
end
else
ShowMessage('IE is not running');
end;


procedure TForm1.FormCreate(Sender: TObject);
begin
DDE:=TDdeClientConv.Create(Self);
end;

end.

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧