Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drag and drop from another application 1

Status
Not open for further replies.

madlarry

Programmer
Dec 6, 2000
117
GB
Hi,

I have a form with a TextBox on it. I also have Explorer running. I want to be able to drag a file from Explorer and when I drop it onto the Text box the path and filename appears in the TextBox. (i.e. this will mimic the behaviour of other Programs such as dragging and dropping a file into the 'Run' menu item on the standard Start menu).

Any ideas

Larry
 
Hope this helps, i have the full code if you need it

Private Sub insure_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)

Dim numFiles As Integer
fnme.Text = Data.Files(1)
' load file from data.files(1)

End Sub
 
Thanks,

Once I set the OLEDragMode property for the TextBox it worked a treat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top