Esempio n. 1
0
        public static int GetDeviceCaps(DeviceCap cap)
        {
            using (var g = Graphics.FromHwnd(IntPtr.Zero))
            {
                //Console.WriteLine("Graphics.DpiX: " + g.DpiX);
                //Console.WriteLine("Graphics.DpiY: " + g.DpiY);
                //Console.WriteLine();

                //var hdc = new HandleRef(g, g.GetHdc());
                IntPtr hdc    = g.GetHdc();
                int    result = GetDeviceCaps(hdc, (int)cap);
                g.ReleaseHdc();
                return(result);
            }
        }
Esempio n. 2
0
 internal static extern int GetDeviceCaps(IntPtr hdc, DeviceCap capindex);
Esempio n. 3
0
 private static extern int GetDeviceCaps(IntPtr hdc, DeviceCap nIndex);
Esempio n. 4
0
 public static extern int GetDeviceCaps(HandleRef hdc, DeviceCap capability);
Esempio n. 5
0
 public static extern int GetDeviceCaps(
     User32.SafeDCHandle hdc,
     DeviceCap nIndex);
Esempio n. 6
0
 public static extern int GetDeviceCaps(IntPtr hdc, DeviceCap deviceCap);
Esempio n. 7
0
 public static extern Int32 GetDeviceCaps(IntPtr hDC, DeviceCap cap);
 public static extern int GetDeviceCaps(SafeDC hdc, DeviceCap nIndex);
Esempio n. 9
0
 public static extern int GetDeviceCaps(IntPtr hdc, DeviceCap nIndex);
 private static extern int GetDeviceCaps(IntPtr hdc, DeviceCap nIndex);
 internal static extern int GetDeviceCaps(IntPtr hDc, DeviceCap nIndex);
Esempio n. 12
0
 public static extern Int32 GetDeviceCaps(IntPtr hdc, DeviceCap capindex);
Esempio n. 13
0
 internal static extern int GetDeviceCaps(IntPtr hdc, DeviceCap capindex);
Esempio n. 14
0
 public static extern int GetDeviceCaps(
     HandleRef hdc,
     [MarshalAs(UnmanagedType.I4)] DeviceCap nIndex
     );
Esempio n. 15
0
 public static extern int GetDeviceCaps(IntPtr hdc, DeviceCap nIndex);
Esempio n. 16
0
 public static extern int GetDeviceCaps(HDC hdc, DeviceCap index);
Esempio n. 17
0
 public static extern int GetDeviceCaps(SafeDC hdc, DeviceCap nIndex);
Esempio n. 18
0
 public static extern int GetDeviceCaps(
     User32.SafeDCHandle hdc,
     DeviceCap nIndex);
Esempio n. 19
0
 internal static extern int GetDeviceCaps(IntPtr hDC, DeviceCap cap);