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 a collection of filenames used by the sftCFFiles format.
Get
| VB.NET | Files = object.Files As DataObjectFiles |
| VB | Set Files = object.Files As DataObjectFiles |
| C#.NET | DataObjectFiles Files = object.Files; |
| VC++ | IVDMDataObjectFiles* Files = object->Files; IVDMDataObjectFiles* Files = object->GetFiles(); |
| C | HRESULT object->get_Files(struct IVDMDataObjectFiles** Files); |
object
Files
Returns a DataObjectFiles object reference which can be used to access the file names in the collection.
The Files property returns a collection of filenames used by the sftCFFiles format.
The Files collection is filled with file names only when the DataObject object contains data of type sftCFFiles. The DataObject object can contain several different types of data. You can iterate through the Files collection using the DataObjectFiles.Item property to retrieve the list of file names.
The Files collection can be filled to allow an application to act as a drag source for a list of files (similar to Windows Explorer).
Dim o As Object = e.data.GetData(SftOLEClipboardConstants.sftCFBitmap)
comboTarget.get_Item(itemIndex).Image.Picture = o 'as stdole.IPictureDisp
comboTarget.Items.Selection = itemIndex
End If
If e.data.GetFormat(SftOLEClipboardConstants.sftCFFiles) Then
Dim itemIndex As Integer = -1
Dim toIndex As Integer = comboTarget.Items.DropIndex
Dim s As String
For Each s In e.data.Files
itemIndex = comboTarget.Items.Insert(s, toIndex)
toIndex = toIndex + 1
Next
comboTarget.Items.Selection = itemIndex
End If
comboTarget.Columns.MakeOptimal(0)
comboTarget.Items.RecalcHorizontalExtent(0)
If Data.GetFormat(sftCFDIB) Then
ItemIndex = ComboTarget.Items.Insert("A Bitmap", ComboTarget.Items.DropIndex)
Set ComboTarget.Item(ItemIndex).Image.Picture = Data.GetData(sftCFDIB)
ComboTarget.Items.Selection = ItemIndex
End If
If Data.GetFormat(sftCFFiles) Then
Dim vData As Variant, ToIndex As Long
ToIndex = ComboTarget.Items.DropIndex
For Each vData In Data.Files
ItemIndex = ComboTarget.Items.Insert(vData, ToIndex)
ToIndex = ToIndex + 1
Next
ComboTarget.Items.Selection = ItemIndex
End If
ComboTarget.Columns.MakeOptimal 0
ComboTarget.Items.RecalcHorizontalExtent 0
int itemIndex = comboTarget.Items.Insert("A Bitmap", comboTarget.Items.DropIndex);
object o = e.data.GetData(SftOLEClipboardConstants.sftCFBitmap);
comboTarget.get_Item(itemIndex).Image.Picture = o as stdole.IPictureDisp;
comboTarget.Items.Selection = itemIndex;
}
if (e.data.GetFormat((short) SftOLEClipboardConstants.sftCFFiles)) {
int itemIndex = -1;
int toIndex = comboTarget.Items.DropIndex;
foreach (string s in e.data.Files) {
itemIndex = comboTarget.Items.Insert(s, toIndex);
toIndex = toIndex + 1;
}
comboTarget.Items.Selection = itemIndex;
}
comboTarget.Columns.MakeOptimal(0);
comboTarget.Items.RecalcHorizontalExtent(0);See Also DataObject Object | Object Hierarchy
