Question[Help]Mouse Position coordinates

Posts 1–10 of 10 · Page 1 of 1
[Help]Mouse Position coordinates
I mean atm Im just using api's,but what do you think is the easiest way to grab the coordinates on screen in a form/out of a form.
Mouse X/Y in your form
Code:
   Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
        Label1.Text = "X = " & e.X & vbCrLf & "Y = " & e.Y
    End Sub
and how would you go about getting the coordinates from outside a form. ?
that is the question xD
Put this in a timer or the mousemove function.

Code:
Me.Text = MousePosition.ToString
Quote Originally Posted by Erinador View Post
Put this in a timer or the mousemove function.

Code:
Me.Text = MousePosition.ToString
Yeah we got inside a form,But what if you want the position off a form, or on the web browser inside the form
My code tells you the coordinates of the mouse even if it is out of the form.
Quote Originally Posted by Erinador View Post
My code tells you the coordinates of the mouse even if it is out of the form.
Nope It doesn't
Quote Originally Posted by Unkn0wn_h4cker View Post
Nope It doesn't
Weird :s it does for me.
Dim MouseP as Point

MouseP = myControl.PointToClient(Cursor.Position)
Textbox1.text = "X = " & MouseP.X & ", " & MouseP.Y
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us