Say You Want to detect a drop on a picturebox (It doesn't really matter what controll you use but Picture1 is used in the example. Set it's OLEDropMode Property to 1 - Manual then add this code
This will give you a message of the filename of each file that's dropped into your picturebox. You can manipulate the files as you like from theire names, not just Message them.Code:Private Sub Picture1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) Dim varTemp As Variant For Each varTemp In Data.Files MsgBox varTemp Next varTemp End Sub




Reply With Quote