public static extern bool GetWindowRect(IntPtr hWnd, ref RECT lpRect);
public static extern bool AdjustWindowRectEx(ref RECT lpRect, int dwStyle, bool bMenu, int dwExStyle);
public static extern bool RedrawWindow(HandleRef hwnd, ref RECT rcUpdate, HandleRef hrgnUpdate, int flags);
public static extern bool PtInRect(ref RECT lprc, POINT pt);
public static extern bool GetClientRect(IntPtr hWnd, ref RECT r);
public static extern bool GetClientRect(int hWnd, ref RECT lpRect);
public static void InvertRect(Graphics graphics, Rectangle rectangle) { IntPtr hdc = graphics.GetHdc(); RECT rect = new RECT(rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom); NativeMethods.InvertRect(hdc, ref rect); graphics.ReleaseHdc(); }