Exemple #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);
        }
Exemple #2
0
 private static extern bool GetMonitorInfo(IntPtr hMonitor, ref MonitorInfoEx lpmi);