import ctypes user32 = ctypes.windll.user32 user32.SetProcessDPIAware() screensize = user32.GetSystemMetrics(0), user32.GetSystemMetrics(1) print(screensize)
References
https://stackoverflow.com/questions/3129322/how-do-i-get-monitor-resolution-in-python
https://stackoverflow.com/questions/32541475/win32api-is-not-giving-the-correct-coordinates-with-getcursorpos-in-python