예제 #1
0
        private void axWebBrowser1_NewWindow2(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e)
        {
            Form1 frmWB;

            frmWB = new Form1();

            frmWB.axWebBrowser1.RegisterAsBrowser = true;
            e.ppDisp      = frmWB.axWebBrowser1.Application;
            frmWB.Visible = true;
        }
예제 #2
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();
            }
        }
예제 #3
0
        public void OnNewWindowTrident(Object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e)
        {
            bool allowPopups = ServiceManager.Preferences.GetBoolPref("browser.allowpopups");

            if (allowPopups)
            {
                BrowserWindow window = new BrowserWindow();
//        window.ShouldLoadHomePage = false;
                window.WebBrowser.RealizeLayoutEngine();
                window.Show();
                e.ppDisp = window.WebBrowser.Trident;
            }
            else
            {
                e.cancel = true;
            }
        }