SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Tests whether the specified action is supported by all selected files/folders.
VB.NET | Supported = object.Can(ByVal Action As String) As Boolean |
VB | Supported = object.Can(ByVal Action As String) As Boolean |
C#.NET | bool Supported = object.Can(string Action); |
VC++ | VARIANT_BOOL Supported = object->Can(_bstr_t Action); |
C | HRESULT object->raw_Can(BSTR Action, VARIANT_BOOL* Supported); |
object
Action
A string defining the action to be tested. The string is case-sensitive and must be entered as shown here, without leading or trailing blanks. Some of the standard Action strings (implemented by Windows and Shell extensions) are:
Action | Description |
---|---|
copy | Copy a file/folder to the clipboard |
open | Execute program or open a file |
explore | Open a file/folder in a new window |
cut | Copy a file/folder to the clipboard and remove it |
delete | Remove a file/folder |
link | Create a shortcut |
move | Move a file/folder to another location |
rename | Rename a file/folder |
droptarget | Tests if a file/folder is a valid target for a drag & drop operation |
paste | Copy the clipboard contents to the specified location |
properties | Display file/folder properties |
NewFolder | Create a new folder |
Supported
On return, specifies whether the specified action is supported by all selected files/folders.
Supported | Description |
---|---|
True | All selected files/folders support the specified action. |
False | At least one file/folder doesn't support the specified action. |
The Can method tests whether the specified action is supported by all selected files/folders.
If the Action is not supported by any one of the files/folders, Supported returns False. Even if all files/folders support the specified action, it does not guarantee that the action can be successfully executed.
Strings provided as Action parameter are Windows operating system specific and may be implemented by Shell extensions. Action parameters are not processed or implemented by SftDirectory, they are simply passed to the Windows Shell or Shell extensions.
The action can be executed using the control's Do method. The Do method will normalize the selections, if multiple files/folders are selected. The process of normalizing selections involves creating a group of files/folders owned by the same immediate parent folder. While it is possible to select any combination of files/folders, the Windows Shell can only execute a command for a group of files/folders owned by one parent folder.
The Can method does not automatically normalize the selection. If the selections should be normalized first, the CorrectSelections method should be used.
The control's Can method tests all currently selected files/folders. The Folder.Can method can be used to test one particular file/folder only.
See Also SftDirectory Object | Object Hierarchy