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
Determines if a specified clipboard format is supported by the DataObject object.
VB | FormatSupported = object.GetFormat(ByVal Format As Integer) As Boolean |
object
Format
The data format requested.
Format | Value | Description |
---|---|---|
sftCFText | 1 | Text |
sftCFBitmap | 2 | Bitmap |
sftCFMetafile | 3 | Metafile |
sftCFDIB | 8 | Device independent bitmap |
sftCFFiles | 15 | List of files. |
sftCFRTF | -16639 | Rich text format |
FormatSupported
Returns True if the specified clipboard format Format is supported by the DataObject object, otherwise False is returned.
The GetFormat method determines if a specified clipboard format is supported by the DataObject object.
The GetFormat method returns True if a data format in the DataObject object matches the specified format. Otherwise, it returns False.
This example uses a picture box (Picture1) which is placed on the same form as the tab control (SftTabs1). A valid bitmap or icon has to be loaded into the picture box (Picture property). By dragging the image from the picture box to a tab of the tab control, the image is added to the tab as tab graphic.
Private Sub Form_Load() Picture1.OLEDragMode = OLEDragSftControlManual SftTabs1.OLEDropMode = OLEDropSftControlManual End Sub Private Sub SftTabs1_OLEDragDrop(Data As SftTabsLib.DataObject, TargetTab As Integer, _ Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single) With SftTabs1.Direct If Data.GetFormat(sftCFDIB) Then ' Bitmap If TargetTab >= 0 Then Set .Tab(TargetTab).Image.Picture = Data.GetData(sftCFDIB) End If End If End With End Sub Private Sub SftTabs1_OLEDragOver(Data As SftTabsLib.DataObject, TargetTab As Integer, _ Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, _ State As SftTabsLib.SftControlOLEDragOverConstants) If TargetTab >= 0 Then Effect = vbDropEffectCopy Else Effect = vbDropEffectNone End If End Sub
See Also DataObject Object | Object Hierarchy