/// <summary>
 /// Handle the browser NewWindow2 event (forward on to listeners)
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="e">event args</param>
 private void AxWebBrowser_NewWindow2(object sender, DWebBrowserEvents2_NewWindow2Event e)
 {
     OnNewWindow2(e);
 }
 /// <summary>
 /// Raises the NewWindow2 event
 /// </summary>
 /// <param name="e">event args</param>
 protected virtual void OnNewWindow2(DWebBrowserEvents2_NewWindow2Event e)
 {
     if (NewWindow2 != null)
         NewWindow2(this, e);
 }
 public virtual void NewWindow2(ref object ppDisp, ref bool cancel)
 {
     DWebBrowserEvents2_NewWindow2Event newwindow2Event = new DWebBrowserEvents2_NewWindow2Event(ppDisp, cancel);
     this.parent.RaiseOnNewWindow2(this.parent, newwindow2Event);
     ppDisp = newwindow2Event.ppDisp;
     cancel = newwindow2Event.cancel;
 }
 /// <summary>
 /// Handle new window event (prevent all pop-up windows from displaying)
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="e">event args</param>
 private void browserControl_NewWindow2(object sender, DWebBrowserEvents2_NewWindow2Event e)
 {
     // prevent pop-ups!
     e.cancel = true;
 }
 internal void RaiseOnNewWindow2(object sender, DWebBrowserEvents2_NewWindow2Event e)
 {
     if ((this.NewWindow2 != null))
     {
         this.NewWindow2(sender, e);
     }
 }