|
-
Jan 12th, 2000, 09:56 AM
#1
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?
-
Jan 12th, 2000, 12:39 PM
#2
Guru
set your form's OLEDropMode to manual and use this code to get the URL
Code:
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, 05:01 AM
#3
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!
-
Jan 13th, 2000, 11:32 AM
#4
Guru
try this for the code in the same event:
Code:
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|