I am trying to use a mousemove or mousedown event to catch where the cursor is on a form. Problem is when I save the X and Y variable it is never the same as I think it should be.
maybe an example
(Make imgMyImage on any old form)
______________________________________________
Private Sub Detail_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MyXPos = x
MyYPos = y
End sub
private sub Move_Image_To_Same_Place_As_MouseDown_Event()
imgMyImage.Left = myXPos
imgMyImage.Top = myYPos
end sub
______________________________________________
When I run the Move_Image sub
the image never returns to where I clicked.
HELP ME
maybe an example
(Make imgMyImage on any old form)
______________________________________________
Private Sub Detail_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MyXPos = x
MyYPos = y
End sub
private sub Move_Image_To_Same_Place_As_MouseDown_Event()
imgMyImage.Left = myXPos
imgMyImage.Top = myYPos
end sub
______________________________________________
When I run the Move_Image sub
the image never returns to where I clicked.
HELP ME