PDA

Click to See Complete Forum and Search --> : Drag and drop URLs


Jan 12th, 2000, 08:56 AM
I just added drag and drop support for local files. It is realy great. Now I want to be able to drag a link from IE, I am not worried about Netscape as much, into my program and be able to take the link. I have seen it done in download managers like Getright. I know it can be done. Any ideas?

Clunietp
Jan 12th, 2000, 11:39 AM
set your form's OLEDropMode to manual and use this code to get the URL


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

MsgBox Data.GetData(vbCFText)

End Sub

Jan 13th, 2000, 04:01 AM
That is realy great. I had drag and drop support for files as well, is there a way to integrate the two? When I drag a file from my desktop it says it is the wrong type. If there isn't a way I will just have to put this part on a seperate, small, form. Thanks again!

Clunietp
Jan 13th, 2000, 10:32 AM
try this for the code in the same event:


If Data.GetFormat(vbCFText) = True Then
MsgBox Data.GetData(vbCFText)
ElseIf Data.GetFormat(vbCFFiles) = True Then

'do something
End If


You can use any of the ClipBoardConstants to check what type of item is being dropped.

Tom