I have a working Python script that captures the width and height of the work area of my primary monitor by the following code.
# First, install library win32api by executing as administrator
# the command "pip install pywin32" in PowerShell. Then,
from win32api import MonitorFromPoint, GetMonitorInfo
handle_for_primary_monitor = MonitorFromPoint((0,0))
monitor_info = GetMonitorInfo(handle_for_primary_monitor)
work_area_info = monitor_info.get("Work")
width_of_work_area = work_area_info[2]
height_of_work_area = work_area_info[3]
Visual Studio Code erroneously throws the following two errors:
How do I get Visual Studio Code to recognize that class MonitorFromPoint and method GetMonitorInfo actually are in the win32api library?