[RESOLVED] Drag and Drop from Explorer to VB App
Man, I'm a little rusty here guys on the OLE stuff, can someone please give me some help. :confused:
Simply want to drag and drop an external Explorer file, such as a text file, onto my App's command button (ideally). The file dropped from Explorer I just need to capture it's full path into a string variable (strSource) and I can take it from there. Any help and refreshers would be greatly appreciated... :thumb:
Re: Drag and Drop from Explorer to VB App
I have requested the thread moved out for the code bank.
Re: Drag and Drop from Explorer to VB App
try something like this
Code:
Private Sub Command1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
MsgBox Data.Files(1)
End Sub
Private Sub Form_Load()
Command1.OLEDropMode = 1 'manual
End Sub
Re: Drag and Drop from Explorer to VB App
Seenu, thanks for your reply. However, during the interim I had noticed I did not set the OLEDropMode during design time, it was incorrectly set at "None" so when set to manual all is well. Thanks very much! :thumb: