public static extern bool GetWindowInfo(IntPtr hwnd, ref WINDOWINFO pwi);
public static WINDOWINFO GetWindowInfo(IntPtr handle) { WINDOWINFO info = new WINDOWINFO(); info.cbSize = (uint)Marshal.SizeOf(info); NativeMethods.GetWindowInfo(handle, ref info); return info; }