/// <summary> /// Raises the NewWindow3 event. /// </summary> protected virtual void OnNewWindow3(WebBrowserNewWindowEventArgs e) { if (this.NewWindow3 != null) { this.NewWindow3(this, e); } }
/// <summary> /// 创建 NewWindow3 事件. /// </summary> protected virtual void OnNewWindow3(WebBrowserNewWindowEventArgs e) { if (this.NewWindow3 != null) { this.NewWindow3(this, e); } }
/// <summary> /// 提高 NewWindows3 事件. /// 当在ActiveX 空间中,NewWindow3事件被触发时, /// 如果WebBrowser2EventHelper的一个实例与底层的ActiveX 空间相关联, /// 这个方法就会被调用。 /// </summary> public void NewWindow3(ref object ppDisp, ref bool Cancel, uint dwFlags, string bstrUrlContext, string bstrUrl) { var e = new WebBrowserNewWindowEventArgs(bstrUrl, Cancel); this.parent.OnNewWindow3(e); Cancel=e.Cancel; }
/// <summary> /// Handle the NewWindow event of the WebBrowserTabPage. when a NewWindow event /// is fired in the WebBrowser, create a tab other than open the page in Internet /// Explorer. /// </summary> void tab_NewWindow(object sender, WebBrowserNewWindowEventArgs e) { if (TabbedWebBrowserContainer.IsTabEnabled) { NewTab(e.Url); e.Cancel = true; } }
/// <summary> /// Raise the NewWindow3 event. /// If an instance of WebBrowser2EventHelper is associated with the underlying /// ActiveX control, this method will be called When the NewWindow3 event was /// fired in the ActiveX control. /// </summary> public void NewWindow3(ref object ppDisp, ref bool Cancel, uint dwFlags, string bstrUrlContext, string bstrUrl) { var e = new WebBrowserNewWindowEventArgs(bstrUrl, Cancel); this.parent.OnNewWindow3(e); Cancel = e.Cancel; }
/// <summary> /// 处理WebBrowserTabPage的NewWindow 事件。 /// 当WebBrowser中 NewWindow 事件被触发时,在nternet Explorer中药创建一个标签并且打开主页. /// </summary> void tab_NewWindow(object sender, WebBrowserNewWindowEventArgs e) { if (TabbedWebBrowserContainer.IsTabEnabled) { NewTab(e.Url); e.Cancel = true; } }