Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

OleDrag2 Sample (VB6)

This sample illustrates SftDirectory as a drag source (drag & drop).

This is not an executable sample, so a complete project is not provided. These statements are intended to show the syntax used.

Private Sub Form_Load()
    SftDirectory1.OLEDragMode = OLEDragSftControlManual
End Sub

Private Sub SftDirectory1_DragStarting(ByVal Button As Integer, ByVal Shift As Integer, _
        ByVal xPos As Single, ByVal yPos As Single)
    Dim F As SftDirectoryFolder
    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
    End If
End Sub

Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.