ShellFolderView.ViewOptions property

Gets a set of flags that indicate the current options of the view.

This property is read-only.

Syntax

objViewOptions = ShellFolderView.ViewOptions

Property value

A variable of type IDispatch that receives the view options object. Contains one or more of the following values:

SFVVO_SHOWALLOBJECTS (0x00000001)

The Show All Files option is enabled.

SFVVO_SHOWEXTENSIONS (0x00000002)

The Hide extensions for known file types option is disabled.

SFVVO_SHOWCOMPCOLOR (0x00000008)

The Display Compressed Files and Folders with Alternate Color option is enabled.

SFVVO_SHOWSYSFILES (0x00000020)

The Do Not Show Hidden Files option is enabled.

SFVVO_WIN95CLASSIC (0x00000040)

The Classic Style option is enabled.

SFVVO_DOUBLECLICKINWEBVIEW (0x00000080)

The Double-Click to Open an Item option is enabled.

SFVVO_DESKTOPHTML (0x00000200)

The Active Desktop – View as Web Page option is enabled.

Remarks

FocusedItem can only be called on the local system. It will not work when run on a webpage over HTTP or UNC.

Examples

The following example shows the proper use of this method in JScript embedded in HTML.

<html>
<head>
<title></title>

<script language="JavaScript">
    function fnShellFolderViewViewOptionsJ()
    {
        var objOptions;
        
        objOptions = WebOC.Document.ViewOptions;
        if (objOptions != null)
        {
            alert(objOptions);
        }
    }
    
    function fnLoad()
    {
        var webOC;
        
        webOC = document.all("WebOC");
        webOC.Navigate("C:\\");
    }
</script>

</head>
<body onload="fnLoad()">
<object id="WebOC"
        classid="clsid:8856F961-340A-11D0-A96B-00C04FD705A2"
        width=400
        height=400>
</object>
<br><br>
<INPUT id=ViewOptions 
       type=button 
       value=ViewOptions 
       name=ViewOptions 
       onclick="fnShellFolderViewViewOptionsJ()">
</body>
</html>

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Shldisp.h
IDL
Shldisp.idl
DLL
Shell32.dll (version 4.71 or later)