开发者

Keep Popup Window in WebBrowser control instead of a new window

W开发者_运维知识库hen using the WebBrowser control, is it possible to cause popup windows to appear within the WebBrowser control itself instead of a new window?

I can't figure out how to get the popup to appear in the same browser window. please help me :)

PS : The language I use is VB


If you have multiple tabs with WebBrowsers, use this under the "New Window" Event:

((WebBrowser)TabControl1.SelectedTab.Controls[0]).Navigate(((WebBrowser)
TabControl1.SelectedTab.Controls[0]).StatusText)

'next input <cancel[IE]>
e.Cancel = True

If just a plain browser put this under the New Window Event:

webBrowser1.Navigate(webBrowser1.StatusText)
e.Cancel = True
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜