(self)
Set DPI awareness to capture full screen on Hi-DPI monitors.
Set DPI awareness to capture full screen on Hi-DPI monitors.
Set DPI awareness to capture full screen on Hi - DPI monitors .
def _set_dpi_awareness(self):
        """ Set DPI awareness to capture full screen on Hi-DPI monitors. """

        version = sys.getwindowsversion()[:2]  # pylint: disable=no-member
        if version >= (6, 3):
            # Windows 8.1+
            # Here 2 = PROCESS_PER_MONITOR_DPI_AWARE, which means:
            #     per monitor DPI aware. This app checks for the DPI when it is
            #     created and adjusts the scale factor whenever the DPI changes.
            #     These applications are not automatically scaled by the system.
            ctypes.windll.shcore.SetProcessDpiAwareness(2)
        elif (6, 0) <= version < (6, 3):
            # Windows Vista, 7, 8 and Server 2012
            self.user32.SetProcessDPIAware()
def _set_dpi_awareness ( self ) : version = sys . getwindowsversion ( ) [ : 2 ] # pylint: disable=no-member if version >= ( 6 , 3 ) : # Windows 8.1+ # Here 2 = PROCESS_PER_MONITOR_DPI_AWARE, which means: #     per monitor DPI aware. This app checks for the DPI when it is #     created and adjusts the scale factor whenever the DPI changes. #     These applications are not automatically scaled by the system. ctypes . windll . shcore . SetProcessDpiAwareness ( 2 ) elif ( 6 , 0 ) <= version < ( 6 , 3 ) : # Windows Vista, 7, 8 and Server 2012 self . user32 . SetProcessDPIAware ( )