2016-11-29 27 views

回答

1

您可以從ctypes的使你的程序DPI使用WINDLL意識到:

from ctypes import windll 

# Make program aware of DPI scaling 
user32 = windll.user32 
user32.SetProcessDPIAware() 

從像GetWindowRect調用點()應返回正確的價值觀。我試着讓Pyautogui給我正確的屏幕截圖,我偶然發現了這個解決方案。