private static extern void _GetProcessDpiAwareness(IntPtr hProcess, out ProcessDpiAwareness value); // Windows 8.1 and above public static ProcessDpiAwareness GetProcessDpiAwareness(IntPtr hProcess) { ProcessDpiAwareness awareness; SHCore._GetProcessDpiAwareness(hProcess, out awareness); return(awareness); }
public static ProcessDpiAwareness GetCurrentProcessDpiAwareness() { var process = System.Diagnostics.Process.GetCurrentProcess(); ProcessDpiAwareness awareness; SHCore._GetProcessDpiAwareness(process.Handle, out awareness); return(awareness); }