Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Extended .NET 2.0 WebBrowser Control

, 29 Mar 2006
Extending the .NET 2.0 WebBrowser control.
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace ExtendedWebBrowser2
{
  /// <summary>
  /// Used in the new navigation events
  /// </summary>
  class BrowserExtendedNavigatingEventArgs : CancelEventArgs
  {
    private Uri _Url;
    /// <summary>
    /// The URL to navigate to
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
    public Uri Url
    {
      get { return _Url; }
    }

    private string _Frame;
    /// <summary>
    /// The name of the frame to navigate to
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
    public string Frame
    {
      get { return _Frame; }
    }

    private UrlContext navigationContext;
    /// <summary>
    /// The flags when opening a new window
    /// </summary>
    public UrlContext NavigationContext
    {
      get { return this.navigationContext; }
    }

    private object _pDisp;
    /// <summary>
    /// The pointer to ppDisp
    /// </summary>
    public object AutomationObject
    {
      get { return this._pDisp; }
      set { this._pDisp = value; }
    }

    /// <summary>
    /// Creates a new instance of WebBrowserExtendedNavigatingEventArgs
    /// </summary>
    /// <param name="automation">Pointer to the automation object of the browser</param>
    /// <param name="url">The URL to go to</param>
    /// <param name="frame">The name of the frame</param>
    /// <param name="navigationContext">The new window flags</param>
    public BrowserExtendedNavigatingEventArgs(object automation, Uri url, string frame, UrlContext navigationContext)
      : base()
    {
      _Url = url;
      _Frame = frame;
      this.navigationContext = navigationContext;
      this._pDisp = automation;
    }
  }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Jeroen Landheer
Web Developer
Chile Chile
I am
- born in The Netherlands
- living in Chile together with my wife.
- a Microsoft Certified Professional Developer on all 3 areas (Windows, Web and Enterprise)
- an MCITP on Microsoft SQL Server 2005 (Database Administrator)
- an active programmer for about 14 years.
- a business owner, of a Dutch company called "The Wheel Automatisering" (http://www.thewheel.nl)
- a coder in C#, VB.Net and Managed C++.
- someone who likes to share knowledge
 
For fun I like to go out with my dogs, enjoy the sun or write some articles that I share with the community.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141223.1 | Last Updated 29 Mar 2006
Article Copyright 2006 by Jeroen Landheer
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid