IWebBrowser2::ShowBrowserBar Method

Shows or hides a specified browser bar.


HRESULT ShowBrowserBar(
    VARIANT *pvaClsid,
    VARIANT *pvaShow,
    VARIANT *pvaSize


  • pvaClsid
    [in] A VARIANT of type VT_BSTR that specifies the class identifier of the browser bar to show or hide. This object must be registered as an Explorer Bar object with the CATID_InfoBand component category.
    Or, A VARIANT of type VT_I2 that specifies one of the following.
    • 0x0009
      Address bar. This value is ignored by Windows Internet Explorer 7.
    • 0x000A
      Tools bar. Not supported by Internet Explorer 7.
    • 0x000B
      Links toolbar.
  • pvaShow
    [in] A pointer to a VARIANT of type VT_BOOL that specifies whether the browser bar should be shown or hidden. If this is nonzero, the browser bar is shown. If this is zero, the browser bar is hidden.
      Browser bar is hidden.
      Browser bar is shown.
  • pvaSize
    [in] Not currently used.

Return Value

Returns S_OK if successful, or E_FAIL otherwise.


Browser bars, also known as Explorer Bars, can be shown or hidden by the user from the View menu of Internet Explorer. For more information, see Creating Custom Explorer Bars, Tool Bands, and Desk Bands.

The standard browser bars use the following class identifiers.

Browser Bar Name Class ID
Search {30D02401-6A81-11D0-8274-00C04FD5AE38}
Favorites {EFA24E61-B078-11D0-89E4-00C04FC9E26E}
History {EFA24E62-B078-11D0-89E4-00C04FC9E26E}
Channels {EFA24E63-B078-11D0-89E4-00C04FC9E26E}

The WebBrowser object delegates this method to the top-level frame. If no frame exists, it returns E_FAIL.