How can you do...
Drag a text link from IE into a form in VB, and have it add that link's URL to a listbox?
Printable View
How can you do...
Drag a text link from IE into a form in VB, and have it add that link's URL to a listbox?
You don't have to use API to achieve this. Change design time properties of a ListBox to the following:
OLEDragMode = 1 Automatic
OLEDropMode = 1 Manual
then use this code:
Code:Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
List1.AddItem Data.GetData(vbCFText)
End Sub