I have a picture box and i get the current position of the mouse and store them in two separated labels. And I have a button to set a new position to the mouse but the position I get its not correct.
I get x = 399 y = 237
But when I click the button to set the mouse position to this location i get x = 175 y = 175
This is the code I use to get the x and y:
Private Sub PictureBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseClick
PPoint = New Point(e.X, e.Y)
Label8.Text = e.X
Label9.Text = e.Y
End Sub
And this is the code i use to set the new position to the mouse
Private Sub Button8_Click(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button8.Click
Cursor.Position = PPoint
End Sub
I have try a different way to do but i continue with the same problem. Tis is the code i have try from Find Mouse Position