Ejemplo n.º 1
0
 /// <summary>
 /// Sets the current process to a specified dots per inch (dpi) awareness level.
 /// </summary>
 /// <param name="value">The DPI awareness value to set.</param>
 /// <returns></returns>
 public static bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value)
 {
     if (IsPlatformSupported)
     {
         return(NativeMethods.SetProcessDpiAwareness(value).Succeeded);
     }
     return(false);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Retrieves the dots per inch (dpi) awareness of the specified process.
 /// </summary>
 /// <param name="hprocess">Handle of the process that is being queried. If this parameter is NULL, the current process is queried.</param>
 /// <returns>The DPI awareness of the specified process.</returns>
 public static PROCESS_DPI_AWARENESS GetProcessDpiAwareness(IntPtr hprocess)
 {
     if (IsPlatformSupported)
     {
         PROCESS_DPI_AWARENESS value = PROCESS_DPI_AWARENESS.PROCESS_DPI_UNAWARE;
         if (NativeMethods.GetProcessDpiAwareness(hprocess, ref value).Succeeded)
         {
             return(value);
         }
     }
     return(PROCESS_DPI_AWARENESS.PROCESS_DPI_UNAWARE);
 }
Ejemplo n.º 3
0
        public static PROCESS_DPI_AWARENESS GetProcessDpiAwareness(IntPtr hprocess)
        {
            PROCESS_DPI_AWARENESS pda = PROCESS_DPI_AWARENESS.PROCESS_DPI_UNAWARE;

            if (GetProcessDpiAwareness(hprocess, out pda) != 0)
            {
                int error     = Marshal.GetLastWin32Error();
                var exception = new System.ComponentModel.Win32Exception(error);
                Debug.WriteLine("ERROR: " + error + ": " + exception.Message);
                return(PROCESS_DPI_AWARENESS.PROCESS_DPI_ERROR);
            }
            return(pda);
        }
Ejemplo n.º 4
0
 public static extern HResult GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS value);
Ejemplo n.º 5
0
		public static extern uint SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 6
0
 public static extern void SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value);
Ejemplo n.º 7
0
 private static extern int GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 8
0
 internal static extern int SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value);
 private static extern int SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 10
0
 public static extern HRESULT GetProcessDpiAwareness(IntPtr hprocess, ref PROCESS_DPI_AWARENESS value);
Ejemplo n.º 11
0
 private static extern void GetProcessDpiAwarenessNative(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 12
0
 /// <summary>
 /// Sets the current process to a specified dots per inch (dpi) awareness level. 
 /// </summary>
 /// <param name="value">The DPI awareness value to set.</param>
 /// <returns></returns>
 public static bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value)
 {
     if (IsPlatformSupported)
     {
         return NativeMethods.SetProcessDpiAwareness(value).Succeeded;
     }
     return false;
 }
Ejemplo n.º 13
0
 public static void GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness)
 {
     GetProcessDpiAwarenessNative(hprocess, out awareness);
 }
Ejemplo n.º 14
0
 private static extern bool SetProcessDpiAwarenessNative(PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 15
0
#pragma warning restore CA1707 // Identifiers should not contain underscores


        public static bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness)
        {
            return(SetProcessDpiAwarenessNative(awareness));
        }
Ejemplo n.º 16
0
 public static extern IntPtr SetProcessDpiAwareness(PROCESS_DPI_AWARENESS dpiAwareness);
Ejemplo n.º 17
0
 internal static extern int GetProcessDpiAwareness(IntPtr hWnd, out PROCESS_DPI_AWARENESS value);
Ejemplo n.º 18
0
 private static extern int GetProcessDpiAwareness(SafeProcessHandle hprocess, out PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 19
0
 public static extern void GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness);
 private static extern int GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 21
0
 public static extern bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 22
0
 public static extern int GetProcessDpiAwareness(IntPtr processHandle, out PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 23
0
 [DllImport("user32.dll", PreserveSig = false, ExactSpelling = true, EntryPoint = "SetProcessDpiAwarenessInternal")] //This is a #define in Windows.h
 public static extern void SetProcessDPIAwareness(PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 24
0
 internal static extern uint SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 25
0
 public static extern void SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value);
Ejemplo n.º 26
0
 private static extern int SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 27
0
 public static extern HRESULT GetProcessDpiAwareness([In, Optional] HPROCESS hprocess, out PROCESS_DPI_AWARENESS value);
Ejemplo n.º 28
0
 [DllImport("SHCore.dll", SetLastError = true)] public static extern bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 29
0
 public static extern bool SetProcessDpiAwarenessContext(PROCESS_DPI_AWARENESS value);
Ejemplo n.º 30
0
 public static extern int GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS value);
Ejemplo n.º 31
0
 public static extern HRESULT GetProcessDpiAwareness(IntPtr hprocess, ref PROCESS_DPI_AWARENESS value);
Ejemplo n.º 32
0
		public static extern uint GetProcessDpiAwareness(IntPtr handle, out PROCESS_DPI_AWARENESS awareness);
Ejemplo n.º 33
0
 public static extern void GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness);