示例#1
0
        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);
        }
示例#2
0
        public static ProcessDpiAwareness GetCurrentProcessDpiAwareness()
        {
            var process = System.Diagnostics.Process.GetCurrentProcess();

            ProcessDpiAwareness awareness;

            SHCore._GetProcessDpiAwareness(process.Handle, out awareness);
            return(awareness);
        }