예제 #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);
 }
예제 #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);
 }
예제 #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);
        }
예제 #4
0
 public static extern HResult GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS value);
예제 #5
0
파일: Win32.dpi.cs 프로젝트: picoe/Eto
		public static extern uint SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
예제 #6
0
 public static extern void SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value);
예제 #7
0
 private static extern int GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness);
예제 #8
0
 internal static extern int SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value);
 private static extern int SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
예제 #10
0
 public static extern HRESULT GetProcessDpiAwareness(IntPtr hprocess, ref PROCESS_DPI_AWARENESS value);
예제 #11
0
 private static extern void GetProcessDpiAwarenessNative(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness);
예제 #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;
 }
예제 #13
0
 public static void GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness)
 {
     GetProcessDpiAwarenessNative(hprocess, out awareness);
 }
예제 #14
0
 private static extern bool SetProcessDpiAwarenessNative(PROCESS_DPI_AWARENESS awareness);
예제 #15
0
#pragma warning restore CA1707 // Identifiers should not contain underscores


        public static bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness)
        {
            return(SetProcessDpiAwarenessNative(awareness));
        }
예제 #16
0
 public static extern IntPtr SetProcessDpiAwareness(PROCESS_DPI_AWARENESS dpiAwareness);
예제 #17
0
 internal static extern int GetProcessDpiAwareness(IntPtr hWnd, out PROCESS_DPI_AWARENESS value);
예제 #18
0
 private static extern int GetProcessDpiAwareness(SafeProcessHandle hprocess, out PROCESS_DPI_AWARENESS awareness);
예제 #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);
예제 #21
0
 public static extern bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
예제 #22
0
 public static extern int GetProcessDpiAwareness(IntPtr processHandle, out PROCESS_DPI_AWARENESS awareness);
예제 #23
0
파일: Program.cs 프로젝트: lmagder/TFV
 [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);
예제 #24
0
 internal static extern uint SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
예제 #25
0
 public static extern void SetProcessDpiAwareness(PROCESS_DPI_AWARENESS value);
예제 #26
0
 private static extern int SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
예제 #27
0
 public static extern HRESULT GetProcessDpiAwareness([In, Optional] HPROCESS hprocess, out PROCESS_DPI_AWARENESS value);
예제 #28
0
파일: NativeW.cs 프로젝트: bclnet/DroidNet
 [DllImport("SHCore.dll", SetLastError = true)] public static extern bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
예제 #29
0
 public static extern bool SetProcessDpiAwarenessContext(PROCESS_DPI_AWARENESS value);
예제 #30
0
 public static extern int GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS value);
예제 #31
0
 public static extern HRESULT GetProcessDpiAwareness(IntPtr hprocess, ref PROCESS_DPI_AWARENESS value);
예제 #32
0
파일: Win32.dpi.cs 프로젝트: picoe/Eto
		public static extern uint GetProcessDpiAwareness(IntPtr handle, out PROCESS_DPI_AWARENESS awareness);
예제 #33
0
 public static extern void GetProcessDpiAwareness(IntPtr hprocess, out PROCESS_DPI_AWARENESS awareness);