对浏览器编程熟的人来看一下

dingfeng1977 2003-06-17 09:50:13
如何用delphi关闭不是用delphi创建打开的ie浏览器?
...全文
49 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
DelphiBoy2003 2003-06-17
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/1923/1923268.xml?temp=.3507044
帮帮忙吧
firetoucher 2003-06-17
  • 打赏
  • 举报
回复
#define BSM_APPLICATIONS 0x00000008
#define BSF_POSTMESSAGE 0x00000010
firetoucher 2003-06-17
  • 打赏
  • 举报
回复
//关闭IE及其它应用
void CloseIE()
{
int app=BSM_APPLICATIONS;
unsigned long bsm_app=(unsigned long )app;
BroadcastSystemMessage(BSF_POSTMESSAGE,&bsm_app,
WM_CLOSE,NULL,NULL);
}
bluecyclone 2003-06-17
  • 打赏
  • 举报
回复
解决后,记着揭帖!我马上就升级了!
bluecyclone 2003-06-17
  • 打赏
  • 举报
回复
运行,点按钮,可以关闭本浏览器!

procedure TForm1.Button1Click(Sender: TObject);
var
hwnd1: Hwnd;
begin
hwnd1 := FindWindow(nil, '对浏览器编程熟的人来看一下 - Microsoft Internet Explorer');
if hwnd1 <> 0 then
begin
SendMessage(hwnd1, WM_CLOSE, 0, 0);
end;
end;
goldencity 2003-06-17
  • 打赏
  • 举报
回复
Message

1,184

社区成员

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

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