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
Performs the specified action.
VB.NET | object.Do(ByVal Action As String) |
VB | object.Do(ByVal Action As String) |
C#.NET | void object.Do(string Action); |
VC++ | HRESULT object->Do(_bstr_t Action); |
C | HRESULT object->raw_Do(BSTR Action); |
object
A SftDirectoryFolder object.
Action
A string defining the action to be executed. 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/folder |
(empty string) | Execute program or open a file/folder (default action for folder type) |
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. Edit mode is entered automatically, so the folder name can be renamed. If the RenameStyle property is set to renameSftDirectoryNone or if the control is a combo box style control (see ControlStyle property), edit mode is not used. |
The Do method performs the specified action.
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 Folder.Can method can be used to test whether the specified action Action is supported by the file/folder. It does not guarantee that the action can be successfully executed.
The Folder.Do method can be used to perform an action for one particular file/folder only. The control's Do method performs the specified action for all currently selected files/folders.
Any error messages that may be issued by the Windows Shell or Shell extension as a result of the Do method are controlled using the ShowErrors and ErrorWindow properties.
End If End Sub Private Sub ButtonProp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonProp.Click ' Display properties dialog for the currently selected item Dim F As SftDirectoryFolder F = AxSftDirectoryRight.CurrentFolder If AxSftDirectoryRight.SelectionCount > 0 And Not F Is Nothing Then F.Do("properties") End If End Sub Private Sub ButtonNewFolder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonNewFolder.Click ' Create a new folder Dim F As SftDirectoryFolder F = AxSftDirectoryRight.RootFolder
End If End Sub Private Sub PropButton_Click() ' Display properties dialog for the currently selected item Dim F As SftDirectoryFolder Set F = SftDirectoryRight.CurrentFolder If SftDirectoryRight.SelectionCount > 0 And Not F Is Nothing Then F.Do "properties" End If End Sub Private Sub NewButton_Click() ' Create a new folder Dim F As SftDirectoryFolder Set F = SftDirectoryRight.RootFolder
} } private void buttonProp_Click(object sender, System.EventArgs e) { // Display properties dialog for the currently selected item SftDirectoryFolder f; f = axSftDirectoryRight.CurrentFolder; if (axSftDirectoryRight.SelectionCount > 0 && f != null) f.Do("properties"); } private void buttonNewFolder_Click(object sender, System.EventArgs e) { // Create a new folder SftDirectoryFolder f; f = axSftDirectoryRight.RootFolder; if (f != null) {
void CSimpleExplorerDlg::OnPropButton() { ISftDirectoryPtr vDirRight = m_DirRight.GetControlUnknown(); // Display properties dialog for the currently selected item ISftDirectoryFolderPtr f; f = vDirRight->CurrentFolder; if (vDirRight->SelectionCount > 0 && f != NULL) { f->Do("properties"); } } void CSimpleExplorerDlg::OnPropNewFolderClicked() { ISftDirectoryPtr vDirRight = m_DirRight.GetControlUnknown();
See Also SftDirectoryFolder Object | Object Hierarchy