【Python】获取屏幕真实分辨率、缩放后的分辨率以及缩放比例_frostime...
blog.csdn.net › frostime › articleMar 11, 2020 · from win32 import win32api, win32gui, win32print from win32. lib import win32con from win32. win32api import GetSystemMetrics def get_real_resolution (): """获取真实的分辨率""" hDC = win32gui. GetDC (0) # 横向分辨率 w = win32print. GetDeviceCaps (hDC, win32con. DESKTOPHORZRES) # 纵向分辨率 h = win32print. GetDeviceCaps (hDC ...