@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The GetMonitorInfo API !!!!C# Signature: [DllImport("User32.dll")] static extern bool GetMonitorInfo(IntPtr hMonitor, [In, Out] MONITORINFOEX lpmi); [DllImport("user32.dll")] static extern bool GetMonitorInfo(IntPtr hMonitor, [In, Out] MONITORINFO lpmi); !!!!User-Defined Types: [MONITORINFOEX] [MONITORINFO] !!!!Notes: None. !!!!Tips & Tricks: System.Windows.Forms.Screen !!!!Sample Code: [DllImport("user32.dll")] internal static extern bool EnumDisplayMonitors(IntPtr hdc, IntPtr lprcClip, MonitorEnumProc lpfnEnum, IntPtr dwData); internal delegate bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData); private void EnumMonitors() { EnumDisplayMonitors(IntPtr.Zero, IntPtr.Zero, MonitorEnumCallBack, IntPtr.Zero); } private bool MonitorEnumCallBack(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData) { MONITORINFOEX mon_info = new MONITORINFOEX(); mon_info.cbSize = (uint)Marshal.SizeOf(mon_info); GetMonitorInfo(hMonitor, ref mon_info); ///Monitor info is stored in 'mon_info' return true; } !!!!Alternative Managed API: Consider System.Windows.Forms.Screen. Documentation: GetMonitorInfo@msdn on MSDN
Edit user32.GetMonitor...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.