Beispiel #1
0
 public static void getWindowMonitorSize( IntPtr hwnd, out int x, out int y, out int width, out int height )
 {
     IntPtr monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
     MONITORINFO info = new MONITORINFO();
     info.cbSize = Marshal.SizeOf(info);
     GetMonitorInfo(monitor, ref info);
     x = info.rcMonitor.X;
     y = info.rcMonitor.Y;
     width = info.rcMonitor.Width;
     height = info.rcMonitor.Height;
 }
Beispiel #2
0
 static extern bool GetMonitorInfo(IntPtr hMonitor, ref MONITORINFO lpmi);
Beispiel #3
0
 static extern bool GetMonitorInfo(IntPtr hMonitor, ref MONITORINFO lpmi);