Esempio n. 1
0
 internal void ToNative(ref RECT rect)
 {
     rect.top = (int)Top;
     rect.bottom = (int)Bottom;
     rect.left = (int)Left;
     rect.right = (int)Right;
 }
Esempio n. 2
0
        internal static Position FromNative(ref RECT rect)
        {
            Position position = new Position()
            {
                Top = rect.top,
                Bottom = rect.bottom,
                Left = rect.left,
                Right = rect.right
            };
            position.Height = position.Bottom - position.Top;
            position.Width = position.Right - position.Left;

            return position;
        }
Esempio n. 3
0
 public static extern int GetWindowRect(IntPtr hwnd, out RECT rc);
Esempio n. 4
0
 public static RECT GetWindowRect(IntPtr handle)
 {
     RECT rect = new RECT();
     NativeMethods.GetWindowRect(handle, out rect);
     return rect;
 }