예제 #1
0
        private void AxWebBrowser1_NewWindow2(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e)
        {
            BrowserForm frmBrowser = new BrowserForm();

            e.ppDisp = frmBrowser.AxWebBrowser1.Application;
            if (this.DockPanel != null)
            {
                frmBrowser.Show(this.DockPanel);
            }
            else
            {
                frmBrowser.Show();
            }
        }
예제 #2
0
        /// <summary>
        /// 这是按下Shift点击时弹出新窗口的事件,应该打开一个新标签页
        /// </summary>
        private void AxWebBrowser1_NewWindow3(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow3Event e)
        {
            BrowserForm frmBrowser = new BrowserForm(this.TabPageContextMenuStrip);

            frmBrowser.TitleChange = TitleChange;
            e.ppDisp = frmBrowser.AxWebBrowser1.Application;
            if (this.DockPanel != null)
            {
                frmBrowser.Show(this.DockPanel);
            }
            else
            {
                frmBrowser.Show();
            }
        }