Mouse position

roger
03-13-2001, 09:18 AM
Hi,
I'd like to find the mouse position on the form and if it is within a picturebox, I'd move a line.
Well, I need help with finding the mouse position.

I'd appreciate your help.

Roger

"Great Ideas need Landing Gears as well as Wings"

roger
03-13-2001, 09:29 AM
Hi, guys
I figured it out right after I posted.
Thanks anyway.
Roger

"Great Ideas need Landing Gears as well as Wings"

Ad1
03-13-2001, 09:39 AM
Try
<pre>Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.Text = X & " , " & Y
End Sub</pre>

keeps track of the mouse coordinates whilst on the form
<pre>Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'move line
End Sub</pre>

will detect when mouse moves over picturebox

Ad1
03-13-2001, 09:44 AM
looks like I was too slow

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum