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
Clears all data and formats in a DataObject object.
VB.NET | object.Clear() |
VB | object.Clear |
C#.NET | void object.Clear(); |
VC++ | HRESULT object->Clear(); |
C | HRESULT object->raw_Clear(); |
object
A DataObject object.
The Clear method clears all data and formats in a DataObject object.
This method is available only for OLE drag sources. If Clear is called from a drop target component, an error is generated.
Dim F As SftDirectoryFolder F = AxSftDirectory1.CurrentFolder If Not F Is Nothing Then AxSftDirectory1.OLEDrag(False, True, -1, -1) End If End Sub Private Sub AxSftDirectory1_OLEStartDrag(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_OLEStartDragEvent) Handles AxSftDirectory1.OLEStartDrag e.data.Clear() e.data.SetData(Nothing, SftOLEClipboardConstants.sftCFText) e.allowedEffects = 1 'vbDropEffectCopy End Sub Private Sub AxSftDirectory1_OLESetData(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_OLESetDataEvent) Handles AxSftDirectory1.OLESetData If e.format = SftOLEClipboardConstants.sftCFText Then e.data.SetData("We're dragging a text string - """ & AxSftDirectory1.CurrentFolder.Name & """ - drop it in Write, Word (for example)", SftOLEClipboardConstants.sftCFText)
Set F = SftDirectory1.CurrentFolder If Not F Is Nothing Then SftDirectory1.OLEDrag False, True, -1, -1 End If End Sub Private Sub SftDirectory1_OLEStartDrag(Data As SftDirectoryLib30.DataObject, _ AllowedEffects As Long) Data.Clear Data.SetData , sftCFText AllowedEffects = vbDropEffectCopy End Sub Private Sub SftDirectory1_OLESetData(Data As SftDirectoryLib30.DataObject, Format As Integer) If Format = sftCFText Then Data.SetData "We're dragging a text string - """ & SftDirectory1.CurrentFolder.Name & """ - drop it in Write, Word (for example)", sftCFText
f = axSftDirectory1.CurrentFolder; if (f != null) { axSftDirectory1.OLEDrag(false, true, -1, -1); } } private void axSftDirectory1_OLEStartDrag(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_OLEStartDragEvent e) { e.data.Clear(); e.data.SetData(null, SftOLEClipboardConstants.sftCFText); e.allowedEffects = 1; //vbDropEffectCopy } private void axSftDirectory1_OLESetData(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_OLESetDataEvent e) { if (e.format == (short) SftOLEClipboardConstants.sftCFText) {
if (pFolder) m_vDir1->OLEDrag(VARIANT_FALSE, VARIANT_TRUE, -1, -1); } void COLEDragDlg::OnOLEStartDragSftDirectory1(LPDISPATCH FAR* Data, long FAR* AllowedEffects) { IVDMDataObjectPtr pData(*Data); pData->Clear(); pData->SetData(_variant_t(), _variant_t((short) sftCFText)); *AllowedEffects = 1; //vbDropEffectCopy } void COLEDragDlg::OnOLESetDataSftDirectory1(LPDISPATCH FAR* Data, short FAR* Format) { IVDMDataObjectPtr pData(*Data);
See Also DataObject Object | Object Hierarchy