Exemplo n.º 1
0
        public static DisplayInfoCollection GetDisplays()
        {
            DisplayInfoCollection col = new DisplayInfoCollection();

            NativeMethod.EnumDisplayMonitors(IntPtr.Zero, IntPtr.Zero,
                                             delegate
                                             (IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData)
            {
                col.Add(GetInfo(hMonitor));

                return(true);
            }, IntPtr.Zero);
            return(col);
        }