Example #1
0
 public static User.Struct.WINDOWINFO GetWindowInfoStruct(IntPtr hWnd)
 {
     User.Struct.WINDOWINFO wi = new User.Struct.WINDOWINFO();
     wi.cbSize = (uint)Marshal.SizeOf(wi);
     User.GetWindowInfo(hWnd, ref wi);
     return(wi);
 }
Example #2
0
 public static User.Struct.WINDOWINFO GetWindowInfoStruct(IntPtr hWnd)
 {
     User.Struct.WINDOWINFO wi = new User.Struct.WINDOWINFO();
     wi.cbSize = (uint)Marshal.SizeOf(wi);
     User.GetWindowInfo(hWnd, ref wi);
     return wi;
 }
Example #3
0
 public static void GetWindowSize(IntPtr hwnd, out int width, out int height)
 {
     User.Struct.WINDOWINFO wi = Windows.GetWindowInfoStruct(hwnd);
     width  = wi.rcWindow.Right - wi.rcWindow.Left;
     height = wi.rcWindow.Bottom - wi.rcWindow.Top;
 }