You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
692 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Runtime.InteropServices;
  4. using System.Text;
  5. namespace Apewer.Internals.Interop
  6. {
  7. internal class SHCore
  8. {
  9. [DllImport("SHCore.dll", SetLastError = true)]
  10. public static extern bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
  11. [DllImport("SHCore.dll", SetLastError = true)]
  12. public static extern void GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness);
  13. public enum PROCESS_DPI_AWARENESS
  14. {
  15. Process_DPI_Unaware = 0,
  16. Process_System_DPI_Aware = 1,
  17. Process_Per_Monitor_DPI_Aware = 2
  18. }
  19. }
  20. }