|
-
Nov 22nd, 2000, 11:39 PM
#1
can somebody explain how to use the OLEDragDrop deal??
Like If I want to select text from a textbox and then drag it onto a listbox and have the selected text be added to the listbox, how does I does that?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 23rd, 2000, 10:54 AM
#2
Frenzied Member
I Think this'll get ya started...
put a listbox and a textbox on ya form and paste this code:
Code:
Private Sub List1_DragDrop(Source As Control, X As Single, Y As Single)
If Source = Text1 Then List1.AddItem Text1 'Drop it.
End Sub
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.SelStart = 0 'this is optional, just to select the text in the textbox
Text1.SelLength = Len((Text1)) 'this is optional, just to select the text in the textbox
Text1.Drag vbBeginDrag 'Drag it.
End Sub
Hope it helps ya a bit
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 23rd, 2000, 10:55 AM
#3
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
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
|