DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: 18738357139
今日帖子: 51
在线用户: 24
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 08ms (WingKernel) ★☆☆☆☆ -
盒子活跃会员
2004/5/5 20:40:08
标题:
WebBrowser如何处理弹出式网页? 浏览:1562
加入我的收藏
楼主: 在webbrowser打开弹出式的网页,总会打开ie 
我用的是mdi方式
希望实现打开弹出式网页时新建子窗体
在子窗体内显示网页

----------------------------------------------
按此在新窗口浏览图片
I want a click, a click to your heart
A hyperlink into you.
A sexual browser from here to the end
A newsgroup one on one
Don't need a modem to connect to your mind 
No search engine to find you
作者:
男 bios (阿贡) ★☆☆☆☆ -
盒子中级会员
2004/5/5 20:49:11
1楼: 怎么这么多人喜欢写浏览器,想写到 MYIE那么牛可不是容易的事!偶也要学习!
在浏览器的这个事件写吧 偶是用CB 你自己翻译下:
void __fastcall TfmChildwin::CppWebBrowserNewWindow2(TObject *Sender,
      LPDISPATCH *ppDisp, VARIANT_BOOL *Cancel)
{
    if(IsClosing)return;
    //
    TfmChildwin *fNew = CreateMDIChild();
    fNew->CppWebBrowser->Offline = CppWebBrowser->Offline;

    *ppDisp = fNew->CppWebBrowser->ControlInterface;
}
----------------------------------------------
按此在新窗口浏览图片
按此在新窗口浏览图片
作者:
男 08ms (WingKernel) ★☆☆☆☆ -
盒子活跃会员
2004/5/5 21:05:24
2楼: 不好意思
我翻不了
你帮我翻翻吧

----------------------------------------------
按此在新窗口浏览图片
I want a click, a click to your heart
A hyperlink into you.
A sexual browser from here to the end
A newsgroup one on one
Don't need a modem to connect to your mind 
No search engine to find you
作者:
男 bios (阿贡) ★☆☆☆☆ -
盒子中级会员
2004/5/5 21:17:36
3楼: procedure TfmChildwin.CppWebBrowserNewWindow2(Sender:TObject;
       ppDisp:LPDISPATCH; var Cancel VARIANT_BOOL );
var
  fnew:TfmChildwin;
begin
    if(IsClosing) then//如果正在关闭就不浏览了
     exit;
    fNew := TfmChildwin.create(nil);
    fNew.CppWebBrowser.Offline := CppWebBrowser.Offline;
    ppDisp^ := fNew.CppWebBrowser.ControlInterface;
end;
 不敢保证对,先编译一下!
----------------------------------------------
按此在新窗口浏览图片
按此在新窗口浏览图片
作者:
男 08ms (WingKernel) ★☆☆☆☆ -
盒子活跃会员
2004/5/5 21:36:24
4楼: LPDISPATCH这个在帮助里找不到
另外
VARIANT_BOOL在帮助里只有c的定义 

----------------------------------------------
按此在新窗口浏览图片
I want a click, a click to your heart
A hyperlink into you.
A sexual browser from here to the end
A newsgroup one on one
Don't need a modem to connect to your mind 
No search engine to find you
作者:
男 bios (阿贡) ★☆☆☆☆ -
盒子中级会员
2004/5/5 21:53:33
5楼: procedure TForm1.WebBrowser1NewWindow2(Sender: TObject;
  var ppDisp: IDispatch; var Cancel: WordBool);
begin

end;

DELPHI中这样的 这些偏底层的东西 C和P又点区别!
----------------------------------------------
按此在新窗口浏览图片
按此在新窗口浏览图片
作者:
男 08ms (WingKernel) ★☆☆☆☆ -
盒子活跃会员
2004/5/5 22:23:38
6楼: IsClosing
delphi里好像没这个

ppDisp^ := fNew.CppWebBrowser.ControlInterface;
这句也不能通过编译
[error]pointer type required


----------------------------------------------
按此在新窗口浏览图片
I want a click, a click to your heart
A hyperlink into you.
A sexual browser from here to the end
A newsgroup one on one
Don't need a modem to connect to your mind 
No search engine to find you
作者:
男 bios (阿贡) ★☆☆☆☆ -
盒子中级会员
2004/5/6 9:11:30
7楼: 哦 DELPHI偶没写过 IsClosing是 全局自定义的BOOL变量
----------------------------------------------
按此在新窗口浏览图片
按此在新窗口浏览图片
作者:
男 08ms (WingKernel) ★☆☆☆☆ -
盒子活跃会员
2004/5/6 18:06:11
8楼: 还有一个问题没回答

ppDisp^ := fNew.CppWebBrowser.ControlInterface;
不能通过编译
[error]pointer type required

----------------------------------------------
按此在新窗口浏览图片
I want a click, a click to your heart
A hyperlink into you.
A sexual browser from here to the end
A newsgroup one on one
Don't need a modem to connect to your mind 
No search engine to find you
作者:
男 bios (阿贡) ★☆☆☆☆ -
盒子中级会员
2004/5/7 8:10:08
9楼: 哦 DELPHI偶没写过啊 所以被办法实验现在很忙啊 看看帮助吧!
----------------------------------------------
按此在新窗口浏览图片
按此在新窗口浏览图片
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行78.125毫秒 RSS