Drag and Drop problem ? 
Author Message
 Drag and Drop problem ?

I'm currently trying to write a application who send files via FTP.
And I can't get the filename from the filelist via drag and drop

How can i drop a filename from a filelist to a textbox ?

Thanks for your help



Thu, 29 Mar 2001 03:00:00 GMT  
 Drag and Drop problem ?

Quote:

> I'm currently trying to write a application who send files via FTP.
> And I can't get the filename from the filelist via drag and drop

> How can i drop a filename from a filelist to a textbox ?

> Thanks for your help

Both the textbox and the filelistbox have two OLE Drag/Drop
properties.  On the filelistbox, highlight OLEDragMode,
and set it to "Automatic"

On the textbox, highlight OLEDropMode, and set it to
"Manual".

Then, under the textbox's OLEDragDrop event, place
the following code:

    'This:    

    ' Returns the path & filename.
    Text1.Text = Data.Files.Item(1)

    ' Or This:

    ' Returns only the filename.
    Dim i As Integer: i = Len(Data.Files.Item(1))
    Dim ctr As Integer
    For ctr = i To 1 Step -1
        If Mid(Data.Files.Item(1), ctr, 1) = "\" Then
            Text1.Text = Mid(Data.Files.Item(1), ctr + 1)
            Exit For
        End If
    Next ctr



Sun, 01 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. drag n drop problem

2. drag and drop problem

3. Treeview and OLE Drag -n- Drop problem

4. Drag and drop problems

5. Drag and Drop Problem

6. Drag-and-drop problem

7. ListView Drag&Drop Problem

8. ListView Drag and Drop problem in icon view

9. TreeView Drag&Drop problems

10. Drag and Drop Problem

11. Drop and Drag Problem and Deployment Problem in VB 50 Enterprise

12. OLE DROP AND DRAG PROBLEM AND DEPLOYMENT PROBLEM

 

 
Powered by phpBB® Forum Software