设置DPI缩放等,wxpython高分辨率下模糊的问题处理
发布日期:2021-06-30 10:11:20 浏览次数:4 分类:技术文章

本文共 693 字,大约阅读时间需要 2 分钟。

import ctypes  # Query DPI Awareness (Windows 10 and 8)  awareness = ctypes.c_int()  errorCode = ctypes.windll.shcore.GetProcessDpiAwareness(0, ctypes.byref(awareness))  print(awareness.value)  # Set DPI Awareness  (Windows 10 and 8)  errorCode = ctypes.windll.shcore.SetProcessDpiAwareness(2)  # the argument is the awareness level, which can be 0, 1 or 2:  # for 1-to-1 pixel control I seem to need it to be non-zero (I'm using level 2)  # Set DPI Awareness  (Windows 7 and Vista)  success = ctypes.windll.user32.SetProcessDPIAware()  # behaviour on later OSes is undefined, although when I run it on my Windows 10 machine, it seems to work with effects identical to SetProcessDpiAwareness(1

转载地址:https://islet.blog.csdn.net/article/details/107531596 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:内存映射文件的优势劣势体会
下一篇:C类型强转的理解

发表评论

最新留言

关注你微信了!
[***.104.42.241]2024年05月03日 06时04分10秒