public Rectangle(RECT rect) { Left = rect.Left; Right = rect.Right; Top = rect.Top; Bottom = rect.Bottom; }
private static RECT GetRect() { RECT rect = new RECT(); rect.Left = LEFT; rect.Right = RIGHT; rect.Top = TOP; rect.Bottom = BOTTOM; return rect; }
internal static extern bool GetWindowRect(IntPtr windowPtr, RECT rect);
private void SetLocation(IntPtr windowPtr, IntPtr windowInsertAfter, RECT rect, uint positioningFlags) { WinApi.SetWindowPos(windowPtr, windowInsertAfter, rect.Left, rect.Top, rect.Right - rect.Left, rect.Bottom - rect.Top, positioningFlags); }
public void SetLocationUnchangedOrder(IntPtr windowPtr, RECT rect) { SetLocation(windowPtr, IntPtr.Zero, rect, (uint) (PositioningFlags.SWP_NOZORDER)); }
public RECT GetLocation(IntPtr windowPtr) { RECT rect = new RECT(); WinApi.GetWindowRect(windowPtr, rect); return rect; }