Skip to content

Instantly share code, notes, and snippets.

@pwlin
Created June 8, 2024 21:42
Show Gist options
  • Save pwlin/e3a0507848f325d37979fd9d4725a491 to your computer and use it in GitHub Desktop.
Save pwlin/e3a0507848f325d37979fd9d4725a491 to your computer and use it in GitHub Desktop.
DPI Aware C Sharp
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