Drag'n Drop Files

The place for threads about TimoSoft EditControls.
Post Reply
Rucksacktraeger
Lieutenant
Posts: 23
Joined: 15 Aug 2010, 08:42

Drag'n Drop Files

Post by Rucksacktraeger »

Hi!

With Standard Textboxes I can Drop Files like this:

Code: Select all

Private Sub txtFile_OLEDragDrop(data As DataObject, effect As Long, button As Integer, shift As Integer, x As Single, y As Single)
   MsgBox data.Files.item(1)
End Sub
It returns the path and filename of the dropped file.

Is this also possible with your Controls? I didn't manage it.

Code: Select all

Private Sub txtFileU_OLEDragDrop(ByVal data As EditCtlsLibUCtl.IOLEDataObject, effect As EditCtlsLibUCtl.OLEDropEffectConstants, ByVal button As Integer, ByVal shift As Integer, ByVal x As Single, ByVal y As Single)
    MsgBox data. ... ???
End Sub
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Drag'n Drop Files

Post by TiKu »

The setup contains a Drag'n'Drop sample which should help you.

Code: Select all

  If Data.GetFormat(vbCFFiles) Then
    On Error GoTo NoFiles
    files = Data.GetData(vbCFFiles)
    For i = LBound(files) To UBound(files)
      MsgBox files(i)
    Next i
NoFiles:
  End If
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Rucksacktraeger
Lieutenant
Posts: 23
Joined: 15 Aug 2010, 08:42

Re: Drag'n Drop Files

Post by Rucksacktraeger »

oops, I'm sorry. I always checked your examples. But in this case i didn't. Next time, I know
Post Reply