Пример #1
0
        /// <summary>
        /// 创建一个新的 WebBrowserTabPage 实例,把它添加到标签控件中,然后签署它的NewWindow事件。
        /// </summary>
        /// <returns></returns>
        WebBrowserTabPage CreateTabPage()
        {
            WebBrowserTabPage tab = new WebBrowserTabPage();

            tab.NewWindow += new EventHandler <WebBrowserNewWindowEventArgs>(tab_NewWindow);
            this.tabControl.TabPages.Add(tab);
            this.tabControl.SelectedTab = tab;
            return(tab);
        }
Пример #2
0
        /// <summary>
        /// Create a new WebBrowserTabPage instance, add it to the tab control, and
        /// subscribe the its NewWindow event.
        /// </summary>
        /// <returns></returns>
        public WebBrowserTabPage CreateTabPage()
        {
            WebBrowserTabPage tab = new WebBrowserTabPage();

            tab.NewWindow += new EventHandler <WebBrowserNewWindowEventArgs>(tab_NewWindow);
            this.tabControl.TabPages.Add(tab);
//          Form ccc = MainForm.ActiveForm;
//          MainForm cccc = (MainForm)this.FindForm();
            tab.ToolTipText             = ((MainForm)this.FindForm()).currentButton;
            this.tabControl.SelectedTab = tab; return(tab);
        }