示例#1
0
        public BrowserControl()
        {
            InitializeComponent();
              _browser = new ExtendedWebBrowser();
              _browser.Dock = DockStyle.Fill;
              _browser.DownloadComplete += new EventHandler(_browser_DownloadComplete);
              _browser.Navigated += new WebBrowserNavigatedEventHandler(_browser_Navigated);
              _browser.StartNewWindow += new EventHandler<BrowserExtendedNavigatingEventArgs>(_browser_StartNewWindow);
              _browser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(_browser_DocumentCompleted);
              this.containerPanel.Controls.Add(_browser);

              // Make the magenta color transparent on the go button
              Bitmap bmp = (Bitmap)goButton.Image;
              bmp.MakeTransparent(Color.Magenta);
        }
示例#2
0
        private static BrowserControl BrowserControlFromBrowser(ExtendedWebBrowser browser)
        {
            // This is a little nasty. The Extended Web Browser is nested in
              // a panel, wich is nested in the browser control

              // Since we want to avoid a NullReferenceException, do some checking

              // Check if we got a extended web browser
              if (browser == null)
            return null;

              // Check if it got a parent
              if (browser.Parent == null)
            return null;

              // Return the parent of the parent using a safe cast.
              return browser.Parent.Parent as BrowserControl;
        }
 public WebBrowserExtendedEvents(ExtendedWebBrowser browser)
 {
     _Browser = browser;
 }