SelectedItems Method
Shell Objects

SelectedItems Method

Description

Retrieves a FolderItems object that represents all of the selected items in the view.

Syntax

object.SelectedItems

ParameterDescription
object Required. An object expression that evaluates to a ShellFolderView object.


SelectItem Method

Description

Sets the selection state of an item in the view.

Syntax

object.SelectItem vItem, dwFlags

ParameterDescription
object Required. An object expression that evaluates to a ShellFolderView object.
vItem Required. The FolderItem object for which the selection state will be set.
dwFlags Required. A set of flags that indicate the new selection state. This can be one or more of the following values:
0 Deselect the item.
1 Select the item.
3 Put the item in edit mode.
4 Deselect all but the specified item.
8 Ensure the item is displayed in the view.
16 Give the item the focus.


ShellFolderView object events

The ShellFolderView object has the following event:
SelectionChanged


SelectionChanged Event

Description

Occurs when the selection state of any item or items in the view has changed.

Syntax

Private Sub object_SelectionChanged

ParameterDescription
object Required. An object expression that evaluates to a ShellFolderView object.


ShellFolderView object constants

The ShellFolderView object uses the following set of constants:
ShellFolderViewOptions


ShellFolderViewOptions Enumeration

Description

Specifies the view options returned by the ViewOptions property.

Syntax
enum ShellFolderViewOptions {
    SFVVO_SHOWALLOBJECTS = 0x00000001,
    SFVVO_SHOWEXTENSIONS = 0x00000002,
    SFVVO_SHOWCOMPCOLOR = 0x00000008,
    SFVVO_SHOWSYSFILES = 0x00000020,
    SFVVO_WIN95CLASSIC = 0x00000040,
    SFVVO_DOUBLECLICKINWEBVIEW = 0x00000080,
    SFVVO_DESKTOPHTML = 0x00000200,
} ShellFolderViewOptions;

ParameterDescription
SFVVO_SHOWALLOBJECTS The Show All Files option is enabled.
SFVVO_SHOWEXTENSIONS The Hide File Extensions for Known File Types option is disabled.
SFVVO_SHOWCOMPCOLOR The Display Compressed Files and Folders with Alternate Color option is enabled.
SFVVO_SHOWSYSFILES The Do Not Show Hidden Files option is enabled.
SFVVO_WIN95CLASSIC The Classic Style option is enabled.
SFVVO_DOUBLECLICKINWEBVIEW The Double-Click to Open an Item option is enabled.
SFVVO_DESKTOPHTML The Active Desktop – View as Web Page option is enabled.


ShellUIHelper Object

The ShellUIHelper object is implemented by the shell to help script and Visual Basic developers to use some of the features available in the shell. The ShellUIHelper object does not have any properties or events. There are methods you can use to add items to the shell.

Methods


ShellUIHelper object methods

The ShellUIHelper object has the following methods:

Methods
AddChannel
AddDesktopComponent
AddFavorite
IsSubscribed


AddChannel Method

Description

Adds a new channel to the list of channels.

Syntax

object.AddChannel URL

ParameterDescription
object Required. An object expression that evaluates to a ShellUIHelper object.
URL Required. A string value that specifies the URL of the Channel Definition File.


AddDesktopComponent Method

Description

Adds an item to the Active Desktop.

Syntax

object.AddDesktopComponent URL, Type, Left, Top, Width, Height

ParameterDescription
object Required. An object expression that evaluates to a ShellUIHelper object.
URL Required. A string value that specifies the URL of the new favorite item.
Type Required. A string value that specifies the type of item being added. This can be one of the following values:
"image" The component is an image.
"website" The component is a web site.
Left Optional. Specifies the position of the left edge of the component, in screen coordinates.
Top Optional. Specifies the position of the top edge of the component, in screen coordinates.
Width Optional. Specifies the width of the component, in screen units.
Height Optional. Specifies the height of the component, in screen units.


AddFavorite Method

Description

Displays the default user interface for creating a favorite item to be displayed. The user interface will be initialized to the specified parameters.

Syntax

object.AddFavorite URL, [Title]

ParameterDescription
object Required. An object expression that evaluates to a ShellUIHelper object.
URL Required. A string value that specifies the URL of the item to be added to the Favorites folder.
Title Optional. A string value that specifies the name of the item.


IsSubscribed Method

Description

Indicates if a URL is subscribed to. Returns TRUE if the URL is subscribed to or FALSE otherwise.

Syntax

object.IsSubscribed URL

ParameterDescription
object Required. An object expression that evaluates to a ShellUIHelper object.
URL Required. A string value that specifies the URL that is to be tested.


ShellWindows Object

The ShellWindows object represents a collection of the open windows that belong to the shell. There are methods that can be used to control and execute commands within the shell. There are also methods that can be used to obtain other shell-related objects.
Properties
Methods


ShellWindows object properties

The ShellWindows object has the following property:
Count


Count Property

Description

Contains the number of items in the collection. This is a read-only property.

Syntax

object.Count

ParameterDescription
object Required. An object expression that evaluates to a ShellWindows object.


ShellWindows object methods

The ShellWindows object has the following methods:
Item
_NewEnum


Item Method

Description

Retrieves an InternetExplorer object that represents the shell window.

Syntax

object.Item [index]

ParameterDescription
object Required. An object expression that evaluates to a ShellWindows object.
index Optional. Specifies the zero-based index of the item to retrieve. This value must be less than the value of the Count property.


_NewEnum Method

Description

Creates and returns a new ShellWindows object that is a copy of this ShellWindows object.

Syntax

object._NewEnum

ParameterDescription
object Required. An object expression that evaluates to a ShellWindows object.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.