private static extern bool _GetWindowInfo(IntPtr hWnd, ref WINDOWINFO pwi);
 public static WINDOWINFO GetWindowInfo(IntPtr hWnd)
 {
     WINDOWINFO info = new WINDOWINFO()
     {
          cbSize = Marshal.SizeOf(typeof(WINDOWINFO))
     };
     if (!_GetWindowInfo(hWnd, ref info))
     {
         HRESULT.ThrowLastError();
     }
     return info;
 }
Example #3
0
 private static extern bool GetWindowInfo_1(IntPtr hWnd, ref WINDOWINFO pwi);