Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcl.Mouse.CursorPos() #112

Open
752473572 opened this issue Mar 31, 2022 · 2 comments
Open

vcl.Mouse.CursorPos() #112

752473572 opened this issue Mar 31, 2022 · 2 comments

Comments

@752473572
Copy link

我在windows10下,通过上面的函数获取坐标,得到的坐标不准确。我的分辨率是1920*1080,但即使我把鼠标拖动到屏幕最右边,显示的坐标X的值只有1500。我用微信截图工具得到的坐标是正确的1920

@ying32
Copy link
Owner

ying32 commented Mar 31, 2022

测试没有问题,如果你觉得有问题而且是windows,可以直接调用winapi GetCursorPos获取结果

@752473572
Copy link
Author

我知道什么问题了,是DPI的影响,我build后的exe选择禁用高DPI的缩放就可以了。请问在代码中我如何处理?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants