|
-
Jul 11th, 2000, 09:46 PM
#1
Thread Starter
Hyperactive Member
I can't believe I can't do this! Any help? I take a picture box and set dragmode to automatic but can't get my Picbox.cursor-position unless I right click! I want to left click and set X to OldX and Y to OldY. I need this to smoothly drop it in the DragDrop sub using:
source.move (X - OldX),(Y - OldY)
Please help!
-
Jul 12th, 2000, 08:17 AM
#2
Thread Starter
Hyperactive Member
I'm bringing this to the top as I was quite late posting. Thanks, hope you all can help.
A friend of mine has just informed me he is having similiar problems with left click on drag of treeview nodes.I really hope you can help us.
Thanks,
Joey O.
-
Jul 12th, 2000, 01:19 PM
#3
Thread Starter
Hyperactive Member
C'mon guys, do you just answer the easy ones? This is a problem you will eventually run into.Please help me out.
-
Jul 12th, 2000, 02:23 PM
#4
If you set the DragMode to Manual, it might be easier.
Code:
Dim OldX As Single
Dim OldY As Single
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
Source.Left = X - OldX
Source.Top = Y - OldY
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
OldX = X
OldY = Y
Picture1.Drag
End If
End Sub
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
|