Created
June 8, 2024 21:42
-
-
Save pwlin/e3a0507848f325d37979fd9d4725a491 to your computer and use it in GitHub Desktop.
DPI Aware C Sharp
This file contains hidden or 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
if (Environment.OSVersion.Version.Major >= 6) | |
{ | |
SetProcessDPIAware(); | |
} | |
[System.Runtime.InteropServices.DllImport("user32.dll")] | |
private static extern bool SetProcessDPIAware(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment