private static void UpdateMaximizedClipRegion(IntPtr hWnd) { var relativeToWindowRect = GetClientRectRelativeToWindowRect(hWnd); ++relativeToWindowRect.Bottom; var rectRgnIndirect = NativeMethods.CreateRectRgnIndirect(ref relativeToWindowRect); NativeMethods.SetWindowRgn(hWnd, rectRgnIndirect, NativeMethods.IsWindowVisible(hWnd)); }
private static void ClearClipRegion(IntPtr hWnd) { NativeMethods.SetWindowRgn(hWnd, IntPtr.Zero, NativeMethods.IsWindowVisible(hWnd)); }
protected void SetRoundRect(IntPtr hWnd, int width, int height) { var roundRectRegion = ComputeRoundRectRegion(0, 0, width, height, CornerRadius); NativeMethods.SetWindowRgn(hWnd, roundRectRegion, NativeMethods.IsWindowVisible(hWnd)); }