请问打开Ie后怎么修改Ie地址栏里的显示值? 收罗方法.谢谢

huangmai 2005-03-18 08:56:27
请问打开Ie后怎么修改Ie地址栏里的显示值? 收罗方法.谢谢
...全文
199 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
kp1150 2005-03-25
  • 打赏
  • 举报
回复
樓上可以!
Kshape 2005-03-19
  • 打赏
  • 举报
回复
如果IE已经打开
直接找到文本框句柄
然后settext应该可以
下面代码没测试过,是通过取得IE地址修改而来的
你看看可以吗?
var
Form1: TForm1;

implementation

{$R *.DFM}
Function SetURL(H:hwnd;lparam:longint):boolean;stdcall;
var str,url:array [0..254] of char;
begin
getclassname(h,@str,255);
if strpas(@str)='ComboBoxEx32' then // ComboBoxEx32可以改成Edit.
SendMessage(h,WM_SETTEXT,255,LongInt(@url));
result:=true;
end;
function callbackproc(H:HWnd;lparam:longint):Boolean;stdcall;
var str:array [1..255] of char;
begin
getclassname(h,@str,255);
if ((strpas(@str)='CabinetWClass') or (strpas(@str)='IEFrame')) then
begin
Enumchildwindows(h,@SetURL,0);
end;
result:=true;
end;

procedure TForm1.findbuttonClick(Sender: TObject);
begin
Enumwindows(@callbackproc,0);
end;

end.

vision2000 2005-03-18
  • 打赏
  • 举报
回复
1、forward转移
2、使用框架,引用其他地址

如:http://thunderoutrunner.ik8.com/

1,183

社区成员

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

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