-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set DPI awareness for win8.1 above windows os
Signed-off-by: xcgspring <[email protected]>
- Loading branch information
Showing
5 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
from UIElement import UIElement | ||
#set DPI awareness for win8.1 | ||
from AXUI.logger import LOGGER | ||
import subprocess | ||
p = subprocess.Popen("wmic path win32_operatingsystem get version", stdout=subprocess.PIPE) | ||
(stdout, stderr) = p.communicate() | ||
windows_version = stdout.split()[1] | ||
if int(windows_version.split(".")[0]) >= 6 and int(windows_version.split(".")[1]) >= 3: | ||
LOGGER().debug("Set DPI awareness for windows verison: %s" % windows_version) | ||
import ctypes | ||
shcore = ctypes.windll.shcore | ||
shcore.SetProcessDpiAwareness(2) | ||
|
||
from UIElement import UIElement |
Binary file modified
BIN
-2 KB
(94%)
AXUI/driver/windows/screenshot/VS_project/screenshot/screenshot.v12.suo
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.