开发者

Inaccurate MousePosition

i'm doing something as simple as form.Location = MousePosition but i keep getting a somewhat constant point (300~,500~) even when i'm clicking something i开发者_开发知识库n the far right of a 1920x1080 screen... am i missing something here?


You're getting the point back relative to some control (possibly the form itself) rather than the absolute position on the screen.

Without seeing your code I'm not going to be able to say exactly what's going on, but you need to see if you are calling PointToClient, for example, on the cursor location.


Sorry for wasting your time, i forgot to set the form's StartPosition property to Manual...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜