Hello people, i'm new here in VBForums, I dont know if its the right place to place a request, if dont, please move it.
Lets go to the problem:
I have a point in the screen that i want to be the same as the resolution changes. I'll explain better. Look out the example
Example:
Here I'm trying to get the diference between my own resolution(1280x800[its a notebooks resolution]) and the point in this resolution that i want the mouse to be is 120,540.HTML Code:Dim point As New Point Dim point1 As New Point Dim x As Integer, y As Integer Dim amaisx As Integer = 0 Dim amaisy As Integer = 0 point = Cursor.Position point1 = Screen.PrimaryScreen.Bounds.Size If point1.X <> 1280 Or point1.Y <> 800 Then amaisx = (1280 - point1.X) * -1 amaisy = (800 - point1.Y) * -1 End If x = point1.X - (point1.X - 120 + amaisx) '120 is the x cordenate of the position I want, and the same for y. y = point1.Y - (point1.Y - 540 + amaisy) SetCursorPos(x, y)
But when I change the screen size it doesnt work of corse.
Are there anyone that can help me with it?
And sorry if my english isnt the best u have ever seen.




Reply With Quote