[python-win32] Unpredictable behavior of pywin32 on new computer

Tim Roberts timr at probo.com
Wed Oct 12 00:53:35 EDT 2022


On 10/11/22 12:23, Zach York wrote:

> Interesting, thanks for the quick response. So would a quick way to 
> test this out be to change the scaling to 100% from whatever it's set at?

That would be an interesting step.  Another thing to try is to call the 
APIs to make your app "high-DPI aware".  You can do that for one process 
using this code:

```

from ctypes import windll
user32 = windll.user32
user32.SetProcessDPIAware()

```

Or you can use a registry hack:

https://stackoverflow.com/questions/43401709/marking-your-python-program-as-high-dpi-aware-seamlessly-windows

-- 
Tim Roberts,timr at probo.com
Providenza & Boekelheide, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-win32/attachments/20221011/bdad242c/attachment.html>


More information about the python-win32 mailing list