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
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.
Private Sub AxAxSftMask1_DragStarting(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_DragStartingEvent) Handles AxSftMask1.DragStarting If AxSftMask1.SelLength <> 0 Then AxSftMask1.OLEDrag() End If End Sub Private Sub AxAxSftMask1_OLEStartDrag(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_OLEStartDragEvent) Handles AxSftMask1.OLEStartDrag e.data.Clear() e.data.Files.Add(AxSftMask1.SelText) e.data.SetData(Nothing, SftOLEClipboardConstants.sftCFFiles) e.allowedEffects = 1 ' vbDropEffectCopy End Sub
Private Sub SftMask1_DragStarting(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single) If SftMask1.SelLength <> 0 Then SftMask1.OLEDrag End If End Sub Private Sub SftMask1_OLEStartDrag(Data As SftMaskLib70.DataObject, AllowedEffects As Long) Data.Clear Data.Files.Add SftMask1.SelText Data.SetData , sftCFFiles AllowedEffects = vbDropEffectCopy End Sub
{ if (axSftMask1.SelLength != 0) { axSftMask1.OLEDrag(); } } private void axSftMask1_OLEStartDrag(object sender, AxSftMaskLib70._ISftMaskEvents_OLEStartDragEvent e) { e.data.Clear(); e.data.Files.Add(axSftMask1.SelText, null); e.data.SetData(null, SftOLEClipboardConstants.sftCFFiles); e.allowedEffects = 1; //vbDropEffectCopy }
if (m_pMask1->SelLength != 0) { m_pMask1->OLEDrag(); } } void CProject1Dlg::OnOLEStartDragSftMask1(LPDISPATCH FAR* Data, long FAR* AllowedEffects) { IVDMDataObjectPtr pData = *Data; pData->Clear(); pData->Files->Add(m_pMask1->SelText); pData->SetData(vtMissing, _variant_t((long) sftCFFiles)); *AllowedEffects = DROPEFFECT_COPY; } BEGIN_EVENTSINK_MAP(CProject1Dlg, CDialog) //{{AFX_EVENTSINK_MAP(CProject1Dlg)
See Also DataObject Object | Object Hierarchy