IShellDispatch2.ShowBrowserBar method
Displays a browser bar.
Syntax
retVal = IShellDispatch2.ShowBrowserBar(
sCLSID,
vShow
)
IShellDispatch2.ShowBrowserBar( _
ByVal sCLSID As BSTR, _
ByVal vShow As Variant _
) As Variant
Parameters
-
sCLSID [in]
-
Type: BSTR
A String that contains the string form of the CLSID of the browser bar to be displayed. The object must be registered as an Explorer Bar object with a CATID_InfoBand component category. For further information, see Creating Custom Explorer Bars, Tool Bands, and Desk Bands.
-
vShow [in]
-
Type: Variant
Set to true to show the browser bar or false to hide it.
Return value
JScript
Type: Variant*
Returns true if successful; otherwise, false.
VB
Type: Variant*
Returns true if successful; otherwise, false.
Remarks
This method is implemented and accessed through the Shell.ShowBrowserBar method.
You can display one of the standard Explorer Bars by setting the sCLSID parameter to the CLSID of that Explorer Bar. The standard Explorer Bars and their CLSID strings are as follows:
Explorer Bar | CLSID string |
---|---|
Favorites | {EFA24E61-B078-11d0-89E4-00C04FC9E26E} |
Folders | {EFA24E64-B078-11d0-89E4-00C04FC9E26E} |
History | {EFA24E62-B078-11d0-89E4-00C04FC9E26E} |
Search | {30D02401-6A81-11d0-8274-00C04FD5AE38} |
This method is not currently available in Microsoft Visual Basic.
Examples
The following examples show the use of ShowBrowserBar to display the Favorites browser bar. Usage is shown for JScript and VBScript.
JScript:
<script language="JavaScript">
function fnShowBrowserBarJ()
{
var objShell = new ActiveXObject("shell.application");
var bReturn;
bReturn = objShell.ShowBrowserBar("{EFA24E61-B078-11d0-89E4-00C04FC9E26E}", true);
}
</script>
VBScript:
<script language="VBScript">
function fnShowBrowserBarVB()
dim objShell
dim bReturn
set objShell = CreateObject("shell.application")
bReturn = objShell.ShowBrowserBar("{EFA24E61-B078-11d0-89E4-00C04FC9E26E}", true)
set objShell = nothing
end function
</script>
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server |
Windows Server 2003 [desktop apps only] |
Header |
|
IDL |
|
DLL |
|