Ejemplo n.º 1
0
        public static IntPtr GetHandle(this Screen screen)
        {
            var point    = new Point(screen.Bounds.Left + 1, screen.Bounds.Top + 1);
            var pt       = new POINTSTRUCT((int)point.X, (int)point.Y);
            var hmonitor = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST);

            return(hmonitor);
        }
Ejemplo n.º 2
0
 public static extern IntPtr MonitorFromPoint([In] POINTSTRUCT pt, [In] uint dwFlags);