|
-
Dec 30th, 2002, 04:48 PM
#1
Thread Starter
Fanatic Member
Drag n Drop
I have picture1, I want the user to be able to move it and drop it on any window, if the window is active or not, Anyway, when the user lets go of the picture1 I want label1 to hold the X and Y of the point the user dropped at to process. How would I do this? right now I have automatic DragMode and this code
VB Code:
Private Sub Picture1_DragDrop(Source As Control, X As Single, Y As Single)
Label1.Caption = "X " & X & " Y " & Y
End Sub
-
Dec 30th, 2002, 04:58 PM
#2
Since you are dragging Picture1 you wont get the Picture1_DragDrop event (unless you drop Picture1 onto Picture1). This event is for the target control.
You would need to capture the DragDrop event for all controls where Picture1 could be dropped.
-
Dec 30th, 2002, 05:09 PM
#3
Thread Starter
Fanatic Member
What about if I want picture1 dropped outside VB? How would I capture where the user puts it? I am trying to make an API spy, where the user can drop a little box on any window and it shows the hWnd, caption and style of the window.
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
|