Exemple #1
0
 protected void Browser_NewWindow3(object sender, NewWindow3EventArgs e)
 {
     if (NewWindow3 != null)
     {
         NewWindow3(sender, e);
     }
 }
Exemple #2
0
 public void NewWindow3(ref object ppDisp, ref bool Cancel, uint dwFlags, string bstrUrlContext, string bstrUrl)
 {
     try
     {
         Delegate handler = this.GetHandler(WebBrowserEvent.NewWindow3);
         if (handler != null)
         {
             NewWindow3EventArgs e = new NewWindow3EventArgs();
             e.ppDisp          = ppDisp;
             e.Cancel          = Cancel;
             e._dwFlags        = dwFlags;
             e._bstrUrlContext = bstrUrlContext;
             e._bstrUrl        = bstrUrl;
             this.Raise(handler, e);
             ppDisp = e.ppDisp;
             Cancel = e.Cancel;
         }
         handler = this.GetHandler(WebBrowserEvent.LegacyBrowserExtendedBeforeNewWindow);
         if (handler != null)
         {
             BrowserExtendedNewWindowEventArgs args2 = new BrowserExtendedNewWindowEventArgs();
             args2.pDisp       = ppDisp;
             args2.Flags       = dwFlags;
             args2.Url         = bstrUrl;
             args2._UrlContext = bstrUrlContext;
             this.Raise(handler, args2);
             ppDisp = args2.pDisp;
             Cancel = args2.Cancel;
         }
     }
     catch (Exception ex) { Trace.WriteLine("NewWindow3 exception: " + ex.Message + "\r\n" + ex.StackTrace); }
 }