Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

IWebBrowser2 (Interfaces)
 
.
Summary
enables applications to implement an instance of the WebBrowser control (Microsoft® ActiveX® control) or control an instance of the InternetExplorer application (OLE Automation).

C# Definition:

    /// <summary><para><c>IWebBrowser2</c> interface.  </para><para>Web Browser Interface for IE4.</para></summary>
        // Web Browser Interface for IE4.
        [Guid("D30C1661-CDAF-11D0-8A3E-00C04FC9E26E")]
            [ComImport]
            [DefaultMember("Name")]
            [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
            [SuppressUnmanagedCodeSecurity]
            public interface IWebBrowser2
        {

            /// <summary><para><c>GoBack</c> method of <c>IWebBrowser2</c> interface.  </para><para>Navigates to the previous item in the history list.</para></summary>
            /// <remarks><para>An original IDL definition of <c>GoBack</c> method was the following:  <c>HRESULT GoBack (void)</c>;</para></remarks>
            // Navigates to the previous item in the history list.
            // IDL: HRESULT GoBack (void);
            // VB6: Sub GoBack
            [DispId(100)]
            void GoBack ();

            /// <summary><para><c>GoForward</c> method of <c>IWebBrowser2</c> interface.  </para><para>Navigates to the next item in the history list.</para></summary>
            /// <remarks><para>An original IDL definition of <c>GoForward</c> method was the following:  <c>HRESULT GoForward (void)</c>;</para></remarks>
            // Navigates to the next item in the history list.
            // IDL: HRESULT GoForward (void);
            // VB6: Sub GoForward
            [DispId(101)]
            void GoForward ();

            /// <summary><para><c>GoHome</c> method of <c>IWebBrowser2</c> interface.  </para><para>Go home/start page.</para></summary>
            /// <remarks><para>An original IDL definition of <c>GoHome</c> method was the following:  <c>HRESULT GoHome (void)</c>;</para></remarks>
            // Go home/start page.
            // IDL: HRESULT GoHome (void);
            // VB6: Sub GoHome
            [DispId(102)]
            void GoHome ();

            /// <summary><para><c>GoSearch</c> method of <c>IWebBrowser2</c> interface.  </para><para>Go Search Page.</para></summary>
            /// <remarks><para>An original IDL definition of <c>GoSearch</c> method was the following:  <c>HRESULT GoSearch (void)</c>;</para></remarks>
            // Go Search Page.
            // IDL: HRESULT GoSearch (void);
            // VB6: Sub GoSearch
            [DispId(103)]
            void GoSearch ();

            /// <summary><para><c>Navigate</c> method of <c>IWebBrowser2</c> interface.  </para><para>Navigates to a URL or file.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Navigate</c> method was the following:  <c>HRESULT Navigate (BSTR URL, [in, optional] VARIANT* Flags, [in, optional] VARIANT* TargetFrameName, [in, optional] VARIANT* PostData, [in, optional] VARIANT* Headers)</c>;</para></remarks>
            // Navigates to a URL or file.
            // IDL: HRESULT Navigate (BSTR URL, [in, optional] VARIANT* Flags, [in, optional] VARIANT* TargetFrameName, [in, optional] VARIANT* PostData, [in, optional] VARIANT* Headers);
            // VB6: Sub Navigate (ByVal URL As String, [Flags As Any], [TargetFrameName As Any], [PostData As Any], [Headers As Any])
            [DispId(104)]
            void Navigate ([MarshalAs(UnmanagedType.BStr)] string URL, [In] ref object Flags, [In] ref object TargetFrameName, [In] ref object PostData, [In] ref object Headers);

            /// <summary><para><c>Refresh</c> method of <c>IWebBrowser2</c> interface.  </para><para>Refresh the currently viewed page.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Refresh</c> method was the following:  <c>HRESULT Refresh (void)</c>;</para></remarks>
            // Refresh the currently viewed page.
            // IDL: HRESULT Refresh (void);
            // VB6: Sub Refresh
            [DispId(-550)]
            void Refresh ();

            /// <summary><para><c>Refresh2</c> method of <c>IWebBrowser2</c> interface.  </para><para>Refresh the currently viewed page.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Refresh2</c> method was the following:  <c>HRESULT Refresh2 ([in, optional] VARIANT* Level)</c>;</para></remarks>
            // Refresh the currently viewed page.
            // IDL: HRESULT Refresh2 ([in, optional] VARIANT* Level);
            // VB6: Sub Refresh2 ([Level As Any])
            [DispId(105)]
            void Refresh2 ([In] ref object Level);

            /// <summary><para><c>Stop</c> method of <c>IWebBrowser2</c> interface.  </para><para>Stops opening a file.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Stop</c> method was the following:  <c>HRESULT Stop (void)</c>;</para></remarks>
            // Stops opening a file.
            // IDL: HRESULT Stop (void);
            // VB6: Sub Stop
            [DispId(106)]
            void Stop ();

            /// <summary><para><c>Quit</c> method of <c>IWebBrowser2</c> interface.  </para><para>Exits application and closes the open document.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Quit</c> method was the following:  <c>HRESULT Quit (void)</c>;</para></remarks>
            // Exits application and closes the open document.
            // IDL: HRESULT Quit (void);
            // VB6: Sub Quit
            [DispId(300)]
            void Quit ();

            /// <summary><para><c>ClientToWindow</c> method of <c>IWebBrowser2</c> interface.  </para><para>Converts client sizes into window sizes.</para></summary>
            /// <remarks><para>An original IDL definition of <c>ClientToWindow</c> method was the following:  <c>HRESULT ClientToWindow ([in, out] int* pcx, [in, out] int* pcy)</c>;</para></remarks>
            // Converts client sizes into window sizes.
            // IDL: HRESULT ClientToWindow ([in, out] int* pcx, [in, out] int* pcy);
            // VB6: Sub ClientToWindow (pcx As Long, pcy As Long)
            [DispId(301)]
            void ClientToWindow ([In, Out] ref int pcx, [In, Out] ref int pcy);

            /// <summary><para><c>PutProperty</c> method of <c>IWebBrowser2</c> interface.  </para><para>Associates vtValue with the name szProperty in the context of the object.</para></summary>
            /// <remarks><para>An original IDL definition of <c>PutProperty</c> method was the following:  <c>HRESULT PutProperty (BSTR Property, VARIANT vtValue)</c>;</para></remarks>
            // Associates vtValue with the name szProperty in the context of the object.
            // IDL: HRESULT PutProperty (BSTR Property, VARIANT vtValue);
            // VB6: Sub PutProperty (ByVal Property As String, ByVal vtValue As Any)
            [DispId(302)]
            void PutProperty ([MarshalAs(UnmanagedType.BStr)] string Property, object vtValue);

            /// <summary><para><c>GetProperty</c> method of <c>IWebBrowser2</c> interface.  </para><para>Retrieve the Associated value for the property vtValue in the context of the object.</para></summary>
            /// <remarks><para>An original IDL definition of <c>GetProperty</c> method was the following:  <c>HRESULT GetProperty (BSTR Property, [out, retval] VARIANT* ReturnValue)</c>;</para></remarks>
            // Retrieve the Associated value for the property vtValue in the context of the object.
            // IDL: HRESULT GetProperty (BSTR Property, [out, retval] VARIANT* ReturnValue);
            // VB6: Function GetProperty (ByVal Property As String) As Any
            [DispId(303)]
            object GetProperty ([MarshalAs(UnmanagedType.BStr)] string Property);

            /// <summary><para><c>Navigate2</c> method of <c>IWebBrowser2</c> interface.  </para><para>Navigates to a URL or file or pidl.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Navigate2</c> method was the following:  <c>HRESULT Navigate2 ([in] VARIANT* URL, [in, optional] VARIANT* Flags, [in, optional] VARIANT* TargetFrameName, [in, optional] VARIANT* PostData, [in, optional] VARIANT* Headers)</c>;</para></remarks>
            // Navigates to a URL or file or pidl.
            // IDL: HRESULT Navigate2 ([in] VARIANT* URL, [in, optional] VARIANT* Flags, [in, optional] VARIANT* TargetFrameName, [in, optional] VARIANT* PostData, [in, optional] VARIANT* Headers);
            // VB6: Sub Navigate2 (URL As Any, [Flags As Any], [TargetFrameName As Any], [PostData As Any], [Headers As Any])
            [DispId(500)]
            void Navigate2 ([In] ref object URL, [In] ref object Flags, [In] ref object TargetFrameName, [In] ref object PostData, [In] ref object Headers);

            /// <summary><para><c>QueryStatusWB</c> method of <c>IWebBrowser2</c> interface.  </para><para>IOleCommandTarget::QueryStatus</para></summary>
            /// <remarks><para>An original IDL definition of <c>QueryStatusWB</c> method was the following:  <c>HRESULT QueryStatusWB (OLECMDID cmdID, [out, retval] OLECMDF* ReturnValue)</c>;</para></remarks>
            // IOleCommandTarget::QueryStatus
            // IDL: HRESULT QueryStatusWB (OLECMDID cmdID, [out, retval] OLECMDF* ReturnValue);
            // VB6: Function QueryStatusWB (ByVal cmdID As OLECMDID) As OLECMDF
            [DispId(501)]
            OLECMDF QueryStatusWB (OLECMDID cmdID);

            /// <summary><para><c>ExecWB</c> method of <c>IWebBrowser2</c> interface.  </para><para>IOleCommandTarget::Exec</para></summary>
            /// <remarks><para>An original IDL definition of <c>ExecWB</c> method was the following:  <c>HRESULT ExecWB (OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, [in, optional] VARIANT* pvaIn, [in, out, optional] VARIANT* pvaOut)</c>;</para></remarks>
            // IOleCommandTarget::Exec
            // IDL: HRESULT ExecWB (OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, [in, optional] VARIANT* pvaIn, [in, out, optional] VARIANT* pvaOut);
            // VB6: Sub ExecWB (ByVal cmdID As OLECMDID, ByVal cmdexecopt As OLECMDEXECOPT, [pvaIn As Any], [pvaOut As Any])
            [DispId(502)]
            void ExecWB (OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, [In] ref object pvaIn, [In, Out] ref object pvaOut);

            /// <summary><para><c>ShowBrowserBar</c> method of <c>IWebBrowser2</c> interface.  </para><para>Set BrowserBar to Clsid</para></summary>
            /// <remarks><para>An original IDL definition of <c>ShowBrowserBar</c> method was the following:  <c>HRESULT ShowBrowserBar ([in] VARIANT* pvaClsid, [in, optional] VARIANT* pvarShow, [in, optional] VARIANT* pvarSize)</c>;</para></remarks>
            // Set BrowserBar to Clsid
            // IDL: HRESULT ShowBrowserBar ([in] VARIANT* pvaClsid, [in, optional] VARIANT* pvarShow, [in, optional] VARIANT* pvarSize);
            // VB6: Sub ShowBrowserBar (pvaClsid As Any, [pvarShow As Any], [pvarSize As Any])
            [DispId(503)]
            void ShowBrowserBar ([In] ref object pvaClsid, [In] ref object pvarShow, [In] ref object pvarSize);

            /// <summary><para><c>AddressBar</c> property of <c>IWebBrowser2</c> interface.  </para><para>Controls whether address bar is shown</para></summary>
            /// <remarks><para>An original IDL definition of <c>AddressBar</c> property was the following:  <c>VARIANT_BOOL AddressBar</c>;</para></remarks>
            // Controls whether address bar is shown
            // IDL: VARIANT_BOOL AddressBar;
            // VB6: AddressBar As Boolean
            bool AddressBar
            {
                // IDL: HRESULT AddressBar ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function AddressBar As Boolean
                [DispId(555)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT AddressBar (VARIANT_BOOL value);
                // VB6: Sub AddressBar (ByVal value As Boolean)
                [DispId(555)]
                set;
            }

            /// <summary><para><c>Application</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns the application automation object if accessible, this automation object otherwise..</para></summary>
            /// <remarks><para>An original IDL definition of <c>Application</c> property was the following:  <c>IDispatch* Application</c>;</para></remarks>
            // Returns the application automation object if accessible, this automation object otherwise..
            // IDL: IDispatch* Application;
            // VB6: Application As IDispatch
            object Application
            {
                // IDL: HRESULT Application ([out, retval] IDispatch** ReturnValue);
                // VB6: Function Application As IDispatch
                [DispId(200)]
                [return: MarshalAs(UnmanagedType.IDispatch)]
                get;
            }

            /// <summary><para><c>Busy</c> property of <c>IWebBrowser2</c> interface.  </para><para>Query to see if something is still in progress.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Busy</c> property was the following:  <c>VARIANT_BOOL Busy</c>;</para></remarks>
            // Query to see if something is still in progress.
            // IDL: VARIANT_BOOL Busy;
            // VB6: Busy As Boolean
            bool Busy
            {
                // IDL: HRESULT Busy ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function Busy As Boolean
                [DispId(212)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
            }

            /// <summary><para><c>Container</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns the container/parent automation object, if any.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Container</c> property was the following:  <c>IDispatch* Container</c>;</para></remarks>
            // Returns the container/parent automation object, if any.
            // IDL: IDispatch* Container;
            // VB6: Container As IDispatch
            object Container
            {
                // IDL: HRESULT Container ([out, retval] IDispatch** ReturnValue);
                // VB6: Function Container As IDispatch
                [DispId(202)]
                [return: MarshalAs(UnmanagedType.IDispatch)]
                get;
            }

            /// <summary><para><c>Document</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns the active Document automation object, if any.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Document</c> property was the following:  <c>IDispatch* Document</c>;</para></remarks>
            // Returns the active Document automation object, if any.
            // IDL: IDispatch* Document;
            // VB6: Document As IDispatch
            object Document
            {
                // IDL: HRESULT Document ([out, retval] IDispatch** ReturnValue);
                // VB6: Function Document As IDispatch
                [DispId(203)]
                [return: MarshalAs(UnmanagedType.IDispatch)]
                get;
            }

            /// <summary><para><c>FullName</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns file specification of the application, including path.</para></summary>
            /// <remarks><para>An original IDL definition of <c>FullName</c> property was the following:  <c>BSTR FullName</c>;</para></remarks>
            // Returns file specification of the application, including path.
            // IDL: BSTR FullName;
            // VB6: FullName As String
            string FullName
            {
                // IDL: HRESULT FullName ([out, retval] BSTR* ReturnValue);
                // VB6: Function FullName As String
                [DispId(400)]
                [return: MarshalAs(UnmanagedType.BStr)]
                get;
            }

            /// <summary><para><c>FullScreen</c> property of <c>IWebBrowser2</c> interface.  </para><para>Maximizes window and turns off statusbar, toolbar, menubar, and titlebar.</para></summary>
            /// <remarks><para>An original IDL definition of <c>FullScreen</c> property was the following:  <c>VARIANT_BOOL FullScreen</c>;</para></remarks>
            // Maximizes window and turns off statusbar, toolbar, menubar, and titlebar.
            // IDL: VARIANT_BOOL FullScreen;
            // VB6: FullScreen As Boolean
            bool FullScreen
            {
                // IDL: HRESULT FullScreen ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function FullScreen As Boolean
                [DispId(407)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT FullScreen (VARIANT_BOOL value);
                // VB6: Sub FullScreen (ByVal value As Boolean)
                [DispId(407)]
                set;
            }

            /// <summary><para><c>Height</c> property of <c>IWebBrowser2</c> interface.  </para><para>The vertical dimension (pixels) of the frame window/object.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Height</c> property was the following:  <c>long Height</c>;</para></remarks>
            // The vertical dimension (pixels) of the frame window/object.
            // IDL: long Height;
            // VB6: Height As Long
            int Height
            {
                // IDL: HRESULT Height ([out, retval] long* ReturnValue);
                // VB6: Function Height As Long
                [DispId(209)]
                get;
                // IDL: HRESULT Height (long value);
                // VB6: Sub Height (ByVal value As Long)
                [DispId(209)]
                set;
            }

            /// <summary><para><c>HWND</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns the HWND of the current IE window.</para></summary>
            /// <remarks><para>An original IDL definition of <c>HWND</c> property was the following:  <c>long HWND</c>;</para></remarks>
            // Returns the HWND of the current IE window.
            // IDL: long HWND;
            // VB6: HWND As Long
            int HWND
            {
                // IDL: HRESULT HWND ([out, retval] long* ReturnValue);
                // VB6: Function HWND As Long
                [DispId(-515)]
                get;
            }

            /// <summary><para><c>Left</c> property of <c>IWebBrowser2</c> interface.  </para><para>The horizontal position (pixels) of the frame window relative to the screen/container.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Left</c> property was the following:  <c>long Left</c>;</para></remarks>
            // The horizontal position (pixels) of the frame window relative to the screen/container.
            // IDL: long Left;
            // VB6: Left As Long
            int Left
            {
                // IDL: HRESULT Left ([out, retval] long* ReturnValue);
                // VB6: Function Left As Long
                [DispId(206)]
                get;
                // IDL: HRESULT Left (long value);
                // VB6: Sub Left (ByVal value As Long)
                [DispId(206)]
                set;
            }

            /// <summary><para><c>LocationName</c> property of <c>IWebBrowser2</c> interface.  </para><para>Gets the short (UI-friendly) name of the URL/file currently viewed.</para></summary>
            /// <remarks><para>An original IDL definition of <c>LocationName</c> property was the following:  <c>BSTR LocationName</c>;</para></remarks>
            // Gets the short (UI-friendly) name of the URL/file currently viewed.
            // IDL: BSTR LocationName;
            // VB6: LocationName As String
            string LocationName
            {
                // IDL: HRESULT LocationName ([out, retval] BSTR* ReturnValue);
                // VB6: Function LocationName As String
                [DispId(210)]
                [return: MarshalAs(UnmanagedType.BStr)]
                get;
            }

            /// <summary><para><c>LocationURL</c> property of <c>IWebBrowser2</c> interface.  </para><para>Gets the full URL/path currently viewed.</para></summary>
            /// <remarks><para>An original IDL definition of <c>LocationURL</c> property was the following:  <c>BSTR LocationURL</c>;</para></remarks>
            // Gets the full URL/path currently viewed.
            // IDL: BSTR LocationURL;
            // VB6: LocationURL As String
            string LocationURL
            {
                // IDL: HRESULT LocationURL ([out, retval] BSTR* ReturnValue);
                // VB6: Function LocationURL As String
                [DispId(211)]
                [return: MarshalAs(UnmanagedType.BStr)]
                get;
            }

            /// <summary><para><c>MenuBar</c> property of <c>IWebBrowser2</c> interface.  </para><para>Controls whether menubar is shown.</para></summary>
            /// <remarks><para>An original IDL definition of <c>MenuBar</c> property was the following:  <c>VARIANT_BOOL MenuBar</c>;</para></remarks>
            // Controls whether menubar is shown.
            // IDL: VARIANT_BOOL MenuBar;
            // VB6: MenuBar As Boolean
            bool MenuBar
            {
                // IDL: HRESULT MenuBar ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function MenuBar As Boolean
                [DispId(406)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT MenuBar (VARIANT_BOOL value);
                // VB6: Sub MenuBar (ByVal value As Boolean)
                [DispId(406)]
                set;
            }

            /// <summary><para><c>Name</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns name of the application.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Name</c> property was the following:  <c>BSTR Name</c>;</para></remarks>
            // Returns name of the application.
            // IDL: BSTR Name;
            // VB6: Name As String
            string Name
            {
                // IDL: HRESULT Name ([out, retval] BSTR* ReturnValue);
                // VB6: Function Name As String
                [DispId(0)]
                [return: MarshalAs(UnmanagedType.BStr)]
                get;
            }

            /// <summary><para><c>Offline</c> property of <c>IWebBrowser2</c> interface.  </para><para>Controls if the frame is offline (read from cache)</para></summary>
            /// <remarks><para>An original IDL definition of <c>Offline</c> property was the following:  <c>VARIANT_BOOL Offline</c>;</para></remarks>
            // Controls if the frame is offline (read from cache)
            // IDL: VARIANT_BOOL Offline;
            // VB6: Offline As Boolean
            bool Offline
            {
                // IDL: HRESULT Offline ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function Offline As Boolean
                [DispId(550)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT Offline (VARIANT_BOOL value);
                // VB6: Sub Offline (ByVal value As Boolean)
                [DispId(550)]
                set;
            }

            /// <summary><para><c>Parent</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns the automation object of the container/parent if one exists or this automation object.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Parent</c> property was the following:  <c>IDispatch* Parent</c>;</para></remarks>
            // Returns the automation object of the container/parent if one exists or this automation object.
            // IDL: IDispatch* Parent;
            // VB6: Parent As IDispatch
            object Parent
            {
                // IDL: HRESULT Parent ([out, retval] IDispatch** ReturnValue);
                // VB6: Function Parent As IDispatch
                [DispId(201)]
                [return: MarshalAs(UnmanagedType.IDispatch)]
                get;
            }

            /// <summary><para><c>Path</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns the path to the application.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Path</c> property was the following:  <c>BSTR Path</c>;</para></remarks>
            // Returns the path to the application.
            // IDL: BSTR Path;
            // VB6: Path As String
            string Path
            {
                // IDL: HRESULT Path ([out, retval] BSTR* ReturnValue);
                // VB6: Function Path As String
                [DispId(401)]
                [return: MarshalAs(UnmanagedType.BStr)]
                get;
            }

            /// <summary><para><c>ReadyState</c> property of <c>IWebBrowser2</c> interface.</para></summary>
            /// <remarks><para>An original IDL definition of <c>ReadyState</c> property was the following:  <c>tagREADYSTATE ReadyState</c>;</para></remarks>
            // IDL: tagREADYSTATE ReadyState;
            // VB6: ReadyState As tagREADYSTATE
            NativeMethods.tagREADYSTATE ReadyState
            {
                // IDL: HRESULT ReadyState ([out, retval] tagREADYSTATE* ReturnValue);
                // VB6: Function ReadyState As tagREADYSTATE
                [DispId(-525)]
                get;
            }

            /// <summary><para><c>RegisterAsBrowser</c> property of <c>IWebBrowser2</c> interface.  </para><para>Registers OC as a top-level browser (for target name resolution)</para></summary>
            /// <remarks><para>An original IDL definition of <c>RegisterAsBrowser</c> property was the following:  <c>VARIANT_BOOL RegisterAsBrowser</c>;</para></remarks>
            // Registers OC as a top-level browser (for target name resolution)
            // IDL: VARIANT_BOOL RegisterAsBrowser;
            // VB6: RegisterAsBrowser As Boolean
            bool RegisterAsBrowser
            {
                // IDL: HRESULT RegisterAsBrowser ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function RegisterAsBrowser As Boolean
                [DispId(552)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT RegisterAsBrowser (VARIANT_BOOL value);
                // VB6: Sub RegisterAsBrowser (ByVal value As Boolean)
                [DispId(552)]
                set;
            }

            /// <summary><para><c>RegisterAsDropTarget</c> property of <c>IWebBrowser2</c> interface.  </para><para>Registers OC as a drop target for navigation</para></summary>
            /// <remarks><para>An original IDL definition of <c>RegisterAsDropTarget</c> property was the following:  <c>VARIANT_BOOL RegisterAsDropTarget</c>;</para></remarks>
            // Registers OC as a drop target for navigation
            // IDL: VARIANT_BOOL RegisterAsDropTarget;
            // VB6: RegisterAsDropTarget As Boolean
            bool RegisterAsDropTarget
            {
                // IDL: HRESULT RegisterAsDropTarget ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function RegisterAsDropTarget As Boolean
                [DispId(553)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT RegisterAsDropTarget (VARIANT_BOOL value);
                // VB6: Sub RegisterAsDropTarget (ByVal value As Boolean)
                [DispId(553)]
                set;
            }

            /// <summary><para><c>Resizable</c> property of <c>IWebBrowser2</c> interface.  </para><para>Controls whether the window is resizable</para></summary>
            /// <remarks><para>An original IDL definition of <c>Resizable</c> property was the following:  <c>VARIANT_BOOL Resizable</c>;</para></remarks>
            // Controls whether the window is resizable
            // IDL: VARIANT_BOOL Resizable;
            // VB6: Resizable As Boolean
            bool Resizable
            {
                // IDL: HRESULT Resizable ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function Resizable As Boolean
                [DispId(556)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT Resizable (VARIANT_BOOL value);
                // VB6: Sub Resizable (ByVal value As Boolean)
                [DispId(556)]
                set;
            }

            /// <summary><para><c>Silent</c> property of <c>IWebBrowser2</c> interface.  </para><para>Controls if any dialog boxes can be shown</para></summary>
            /// <remarks><para>An original IDL definition of <c>Silent</c> property was the following:  <c>VARIANT_BOOL Silent</c>;</para></remarks>
            // Controls if any dialog boxes can be shown
            // IDL: VARIANT_BOOL Silent;
            // VB6: Silent As Boolean
            bool Silent
            {
                // IDL: HRESULT Silent ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function Silent As Boolean
                [DispId(551)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT Silent (VARIANT_BOOL value);
                // VB6: Sub Silent (ByVal value As Boolean)
                [DispId(551)]
                set;
            }

            /// <summary><para><c>StatusBar</c> property of <c>IWebBrowser2</c> interface.  </para><para>Turn on or off the statusbar.</para></summary>
            /// <remarks><para>An original IDL definition of <c>StatusBar</c> property was the following:  <c>VARIANT_BOOL StatusBar</c>;</para></remarks>
            // Turn on or off the statusbar.
            // IDL: VARIANT_BOOL StatusBar;
            // VB6: StatusBar As Boolean
            bool StatusBar
            {
                // IDL: HRESULT StatusBar ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function StatusBar As Boolean
                [DispId(403)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT StatusBar (VARIANT_BOOL value);
                // VB6: Sub StatusBar (ByVal value As Boolean)
                [DispId(403)]
                set;
            }

            /// <summary><para><c>StatusText</c> property of <c>IWebBrowser2</c> interface.  </para><para>Text of Status window.</para></summary>
            /// <remarks><para>An original IDL definition of <c>StatusText</c> property was the following:  <c>BSTR StatusText</c>;</para></remarks>
            // Text of Status window.
            // IDL: BSTR StatusText;
            // VB6: StatusText As String
            string StatusText
            {
                // IDL: HRESULT StatusText ([out, retval] BSTR* ReturnValue);
                // VB6: Function StatusText As String
                [DispId(404)]
                [return: MarshalAs(UnmanagedType.BStr)]
                get;
                // IDL: HRESULT StatusText (BSTR value);
                // VB6: Sub StatusText (ByVal value As String)
                [DispId(404)]
                set;
            }

            /// <summary><para><c>TheaterMode</c> property of <c>IWebBrowser2</c> interface.  </para><para>Controls if the browser is in theater mode</para></summary>
            /// <remarks><para>An original IDL definition of <c>TheaterMode</c> property was the following:  <c>VARIANT_BOOL TheaterMode</c>;</para></remarks>
            // Controls if the browser is in theater mode
            // IDL: VARIANT_BOOL TheaterMode;
            // VB6: TheaterMode As Boolean
            bool TheaterMode
            {
                // IDL: HRESULT TheaterMode ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function TheaterMode As Boolean
                [DispId(554)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT TheaterMode (VARIANT_BOOL value);
                // VB6: Sub TheaterMode (ByVal value As Boolean)
                [DispId(554)]
                set;
            }

            /// <summary><para><c>ToolBar</c> property of <c>IWebBrowser2</c> interface.  </para><para>Controls which toolbar is shown.</para></summary>
            /// <remarks><para>An original IDL definition of <c>ToolBar</c> property was the following:  <c>int ToolBar</c>;</para></remarks>
            // Controls which toolbar is shown.
            // IDL: int ToolBar;
            // VB6: ToolBar As Long
            int ToolBar
            {
                // IDL: HRESULT ToolBar ([out, retval] int* ReturnValue);
                // VB6: Function ToolBar As Long
                [DispId(405)]
                get;
                // IDL: HRESULT ToolBar (int value);
                // VB6: Sub ToolBar (ByVal value As Long)
                [DispId(405)]
                set;
            }

            /// <summary><para><c>Top</c> property of <c>IWebBrowser2</c> interface.  </para><para>The vertical position (pixels) of the frame window relative to the screen/container.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Top</c> property was the following:  <c>long Top</c>;</para></remarks>
            // The vertical position (pixels) of the frame window relative to the screen/container.
            // IDL: long Top;
            // VB6: Top As Long
            int Top
            {
                // IDL: HRESULT Top ([out, retval] long* ReturnValue);
                // VB6: Function Top As Long
                [DispId(207)]
                get;
                // IDL: HRESULT Top (long value);
                // VB6: Sub Top (ByVal value As Long)
                [DispId(207)]
                set;
            }

            /// <summary><para><c>TopLevelContainer</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns True if this is the top level object.</para></summary>
            /// <remarks><para>An original IDL definition of <c>TopLevelContainer</c> property was the following:  <c>VARIANT_BOOL TopLevelContainer</c>;</para></remarks>
            // Returns True if this is the top level object.
            // IDL: VARIANT_BOOL TopLevelContainer;
            // VB6: TopLevelContainer As Boolean
            bool TopLevelContainer
            {
                // IDL: HRESULT TopLevelContainer ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function TopLevelContainer As Boolean
                [DispId(204)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
            }

            /// <summary><para><c>Type</c> property of <c>IWebBrowser2</c> interface.  </para><para>Returns the type of the contained document object.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Type</c> property was the following:  <c>BSTR Type</c>;</para></remarks>
            // Returns the type of the contained document object.
            // IDL: BSTR Type;
            // VB6: Type As String
            string Type
            {
                // IDL: HRESULT Type ([out, retval] BSTR* ReturnValue);
                // VB6: Function Type As String
                [DispId(205)]
                [return: MarshalAs(UnmanagedType.BStr)]
                get;
            }

            /// <summary><para><c>Visible</c> property of <c>IWebBrowser2</c> interface.  </para><para>Determines whether the application is visible or hidden.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Visible</c> property was the following:  <c>VARIANT_BOOL Visible</c>;</para></remarks>
            // Determines whether the application is visible or hidden.
            // IDL: VARIANT_BOOL Visible;
            // VB6: Visible As Boolean
            bool Visible
            {
                // IDL: HRESULT Visible ([out, retval] VARIANT_BOOL* ReturnValue);
                // VB6: Function Visible As Boolean
                [DispId(402)]
                [return: MarshalAs(UnmanagedType.VariantBool)]
                get;
                // IDL: HRESULT Visible (VARIANT_BOOL value);
                // VB6: Sub Visible (ByVal value As Boolean)
                [DispId(402)]
                set;
            }

            /// <summary><para><c>Width</c> property of <c>IWebBrowser2</c> interface.  </para><para>The horizontal dimension (pixels) of the frame window/object.</para></summary>
            /// <remarks><para>An original IDL definition of <c>Width</c> property was the following:  <c>long Width</c>;</para></remarks>
            // The horizontal dimension (pixels) of the frame window/object.
            // IDL: long Width;
            // VB6: Width As Long
            int Width
            {
                // IDL: HRESULT Width ([out, retval] long* ReturnValue);
                // VB6: Function Width As Long
                [DispId(208)]
                get;
                // IDL: HRESULT Width (long value);
                // VB6: Sub Width (ByVal value As Long)
                [DispId(208)]
                set;
            }
        }

VB Definition:

    <ComImport(), Guid("D30C1661-CDAF-11D0-8A3E-00C04FC9E26E"), InterfaceType(ComInterfaceType.InterfaceIsIDispatch), DefaultMember("Name"), SuppressUnmanagedCodeSecurity()> _
    Public Interface IWebBrowser2
    ' Methods
    <DispId(301)> _
    Sub ClientToWindow(<[In](), Out()> ByRef pcx As Integer, <[In](), Out()> ByRef pcy As Integer)
    <DispId(502)> _
    Sub ExecWB(ByVal cmdID As OLECMDID, ByVal cmdexecopt As OLECMDEXECOPT, <[In]()> ByRef pvaIn As Object, <[In](), Out()> ByRef pvaOut As Object)
    <DispId(303)> _
    Function GetProperty(<MarshalAs(UnmanagedType.BStr)> ByVal [Property] As String) As Object
    <DispId(100)> _
    Sub GoBack()
    <DispId(101)> _
    Sub GoForward()
    <DispId(102)> _
    Sub GoHome()
    <DispId(103)> _
    Sub GoSearch()
    <DispId(104)> _
    Sub Navigate(<MarshalAs(UnmanagedType.BStr)> ByVal URL As String, <[In]()> ByRef Flags As Object, <[In]()> ByRef TargetFrameName As Object, <[In]()> ByRef PostData As Object, <[In]()> ByRef Headers As Object)
    <DispId(500)> _
    Sub Navigate2(<[In]()> ByRef URL As Object, <[In]()> ByRef Flags As Object, <[In]()> ByRef TargetFrameName As Object, <[In]()> ByRef PostData As Object, <[In]()> ByRef Headers As Object)
    <DispId(302)> _
    Sub PutProperty(<MarshalAs(UnmanagedType.BStr)> ByVal [Property] As String, ByVal vtValue As Object)
    <DispId(501)> _
    Function QueryStatusWB(ByVal cmdID As OLECMDID) As OLECMDF
    <DispId(300)> _
    Sub Quit()
    <DispId(-550)> _
    Sub Refresh()
    <DispId(105)> _
    Sub Refresh2(<[In]()> ByRef Level As Object)
    <DispId(503)> _
    Sub ShowBrowserBar(<[In]()> ByRef pvaClsid As Object, <[In]()> ByRef pvarShow As Object, <[In]()> ByRef pvarSize As Object)
    <DispId(106)> _
    Sub [Stop]()

    ' Properties
    Property AddressBar() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    ReadOnly Property Application() As <MarshalAs(UnmanagedType.IDispatch)> Object
    ReadOnly Property Busy() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    ReadOnly Property Container() As <MarshalAs(UnmanagedType.IDispatch)> Object
    ReadOnly Property Document() As <MarshalAs(UnmanagedType.IDispatch)> Object
    ReadOnly Property FullName() As <MarshalAs(UnmanagedType.BStr)> String
    Property FullScreen() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    Property Height() As Integer
    ReadOnly Property HWND() As Integer
    Property Left() As Integer
    ReadOnly Property LocationName() As <MarshalAs(UnmanagedType.BStr)> String
    ReadOnly Property LocationURL() As <MarshalAs(UnmanagedType.BStr)> String
    Property MenuBar() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    ReadOnly Property Name() As <MarshalAs(UnmanagedType.BStr)> String
    Property Offline() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    ReadOnly Property Parent() As <MarshalAs(UnmanagedType.IDispatch)> Object
    ReadOnly Property Path() As <MarshalAs(UnmanagedType.BStr)> String
    ReadOnly Property ReadyState() As tagREADYSTATE
    Property RegisterAsBrowser() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    Property RegisterAsDropTarget() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    Property Resizable() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    Property Silent() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    Property StatusBar() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    Property StatusText() As <MarshalAs(UnmanagedType.BStr)> String
    Property TheaterMode() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    Property ToolBar() As Integer
    Property Top() As Integer
    ReadOnly Property TopLevelContainer() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    ReadOnly Property Type() As <MarshalAs(UnmanagedType.BStr)> String
    Property Visible() As <MarshalAs(UnmanagedType.VariantBool)> Boolean
    Property Width() As Integer
    End Interface

User-Defined Types:

tagREADYSTATE, OLECMDID, OLECMDEXECOPT, OLECMDF

Notes:

Required referenece to System, System.Security, System.Runtime.InteropServices, System.Reflection Namespaces

Documentation

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Find References
Show Printable Version
Revisions