예제 #1
0
        /// <summary>
        /// Gets monitor information for the provided window handle
        /// </summary>
        /// <param name="windowHandle">window handle</param>
        /// <param name="monitorInfo">monitor info</param>
        internal static void GetMonitorInfoForWindowHandle(IntPtr windowHandle, ref MonitorInfoEx monitorInfo)
        {
            var hMonitor = MonitorFromWindow(windowHandle, MONITOR_DEFAULTTONEAREST);

            GetMonitorInfo(hMonitor, ref monitorInfo);
        }
예제 #2
0
 private static extern bool GetMonitorInfo(IntPtr hMonitor, ref MonitorInfoEx lpmi);