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.Runtime.InteropServices;

namespace ExtendedWebBrowser2
{
  static class NativeMethods
  {
    public enum OLECMDF
    {
      // Fields
      OLECMDF_DEFHIDEONCTXTMENU = 0x20,
      OLECMDF_ENABLED = 2,
      OLECMDF_INVISIBLE = 0x10,
      OLECMDF_LATCHED = 4,
      OLECMDF_NINCHED = 8,
      OLECMDF_SUPPORTED = 1
    }

    public enum OLECMDID
    {
      // Fields
      OLECMDID_PAGESETUP = 8,
      OLECMDID_PRINT = 6,
      OLECMDID_PRINTPREVIEW = 7,
      OLECMDID_PROPERTIES = 10,
      OLECMDID_SAVEAS = 4,
      // OLECMDID_SHOWSCRIPTERROR = 40
    }
    public enum OLECMDEXECOPT
    {
      // Fields
      OLECMDEXECOPT_DODEFAULT = 0,
      OLECMDEXECOPT_DONTPROMPTUSER = 2,
      OLECMDEXECOPT_PROMPTUSER = 1,
      OLECMDEXECOPT_SHOWHELP = 3
    }

    //[StructLayout(LayoutKind.Sequential)]
    //public class POINT
    //{
    //  public int x;
    //  public int y;
    //  public POINT() { }
    //  public POINT(int x, int y)
    //  {
    //    this.x = x;
    //    this.y = y;
    //  }
    //}

    //[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("B722BCCB-4E68-101B-A2BC-00AA00404770"), ComVisible(true)]
    //public interface IOleCommandTarget
    //{
    //  [return: MarshalAs(UnmanagedType.I4)]
    //  [PreserveSig]
    //  int QueryStatus(ref Guid pguidCmdGroup, int cCmds, [In, Out] NativeMethods.OLECMD prgCmds, [In, Out] IntPtr pCmdText);
    //  [return: MarshalAs(UnmanagedType.I4)]
    //  [PreserveSig]
    //  int Exec(ref Guid pguidCmdGroup, int nCmdID, int nCmdexecopt, [In, MarshalAs(UnmanagedType.LPArray)] object[] pvaIn, ref int pvaOut);
    //}

    //[StructLayout(LayoutKind.Sequential)]
    //public class OLECMD
    //{
    //  [MarshalAs(UnmanagedType.U4)]
    //  public int cmdID;
    //  [MarshalAs(UnmanagedType.U4)]
    //  public int cmdf;
    //  public OLECMD()
    //  {
    //  }
    //}

    //public const int S_FALSE = 1;
    //public const int S_OK = 0;

 
  }
}

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

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 | Mobile
Web04 | 2.8.140721.1 | Last Updated 29 Mar 2006
Article Copyright 2006 by Jeroen Landheer
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid