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
Returns the number of filenames in the DataObject.Files collection (sftCFFiles format only).
Get
VB.NET | Total = object.Count As Integer |
VB | Total = object.Count As Long |
C#.NET | int Total = object.Count; |
VC++ | long Total = object->Count; long Total = object->GetCount(); |
C | HRESULT object->get_Count(long* Total); |
object
A DataObjectFiles object.
Total
Returns the number of filenames in the DataObject.Files collection (sftCFFiles format only).
The Count property returns the number of filenames in the DataObject.Files collection (sftCFFiles format only).
This property can be used to iterate through all file names in the Files collection.
Private Sub AxSftDirectory1_OLEDragDrop(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_OLEDragDropEvent) Handles AxSftDirectory1.OLEDragDrop ' make sure the control doesn't perform its usual default handling of ' the files (copy/move, etc.) e.defaultHandling = False If e.data.GetFormat(SftOLEClipboardConstants.sftCFFiles) Then Dim I As Integer For I = 1 To e.data.Files.Count MessageBox.Show("""" & e.data.Files(I) & """ being dropped.") ' perform your own processing here Next Else ' some other format End If End Sub
SftDirectory1.AutoExpandDragDrop = True End Sub Private Sub SftDirectory1_OLEDragDrop(Data As SftDirectoryLib30.DataObject, _ Folder As SftDirectoryLib30.ISftDirectoryFolder, Effect As Long, _ Button As Integer, Shift As Integer, x As Single, y As Single, _ DefaultHandling As Boolean) If Data.GetFormat(sftCFFiles) Then For i = 1 To Data.Files.Count MsgBox ("""" & Data.Files.Item(i) & """ being dropped.") ' perform your own processing here Next Else ' some other format End If ' make sure the control doesn't perform its usual default handling of
private void axSftDirectory1_OLEDragDrop(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_OLEDragDropEvent e) { // make sure the control doesn't perform its usual default handling of // the files (copy/move, etc.) e.defaultHandling = false; if (e.data.GetFormat((short) SftOLEClipboardConstants.sftCFFiles)) { for (int i = 0 ; i < e.data.Files.Count ; ++i) { MessageBox.Show("\"" + e.data.Files[i+1] + "\" being dropped."); // perform your own processing here } } else { // some other format } }
void COLEDragDlg::OnOLEDragDropSftDirectory1(LPDISPATCH FAR* Data, LPDISPATCH FAR* Folder, long FAR* Effect, short FAR* Button, short FAR* Shift, float FAR* x, float FAR* y, BOOL FAR* DefaultHandling) { IVDMDataObjectPtr pData(*Data); ISftDirectoryFolderPtr pFolder(*Folder); if (pData->GetFormat(sftCFFiles)) { int i; for (i = 1 ; i <= pData->Files->Count ; ++i) { CString str; CString strName((LPCWSTR)pData->Files->Item[i]); str.Format(_T("\"%s\" being dropped."), strName); MessageBox(str); // perform your own processing here } } else { // some other format
See Also DataObjectFiles Object | Object Hierarchy