Strange behavior with SetCursorPos_()
Posted: Thu Nov 14, 2019 8:15 pm
I have a monitor above my primary monitor and I am calling SetCursorPos_(0,-1). I expect the cursor to be placed at the bottom left corner of this monitor but instead it is positioned at the bottom right.
X coordinate values seem to work OK but the Y coordinate seems to affect the X as well.
Am I doing something wrong or is this command not supported for multiple monitors?
UPDATE
My desktop is arranged with three 1080p monitors in an "L" shape with two vertical and one on the right. When I run my program when the PureBasic IDE is on the bottom-right monitor with code that attempts to position the cursor somewhere on the top-left monitor, for example, at (100,-100), the cursor appears in the wrong location.
However, if I run the SAME program with the IDE on ether the bottom-left or the top-left monitor, then the cursor appears in the expected location.
I have a similar problem when attempting to position the cursor somewhere on the bottom-right monitor when the IDE is located in the top-left monitor.
This is very strange and I'm not sure how to work around this problem.
X coordinate values seem to work OK but the Y coordinate seems to affect the X as well.
Am I doing something wrong or is this command not supported for multiple monitors?
Code: Select all
SetCursorPos_(0, -1)
My desktop is arranged with three 1080p monitors in an "L" shape with two vertical and one on the right. When I run my program when the PureBasic IDE is on the bottom-right monitor with code that attempts to position the cursor somewhere on the top-left monitor, for example, at (100,-100), the cursor appears in the wrong location.
However, if I run the SAME program with the IDE on ether the bottom-left or the top-left monitor, then the cursor appears in the expected location.
I have a similar problem when attempting to position the cursor somewhere on the bottom-right monitor when the IDE is located in the top-left monitor.
This is very strange and I'm not sure how to work around this problem.