Exemplo n.º 1
0
        public static int ScreenY(IntPtr hWnd)
        {
            IntPtr        handle = NativeMethods.MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);
            MONITORINFOEX info   = new MONITORINFOEX();

            NativeMethods.GetMonitorInfo(handle, info);
            return(info.rcMonitor.bottom - info.rcMonitor.top);
        }
Exemplo n.º 2
0
 internal static extern bool GetMonitorInfo(IntPtr hmonitor, [In, Out] MONITORINFOEX info);