コード例 #1
0
        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));
        }
コード例 #2
0
 private static void ClearClipRegion(IntPtr hWnd)
 {
     NativeMethods.SetWindowRgn(hWnd, IntPtr.Zero, NativeMethods.IsWindowVisible(hWnd));
 }
コード例 #3
0
        protected void SetRoundRect(IntPtr hWnd, int width, int height)
        {
            var roundRectRegion = ComputeRoundRectRegion(0, 0, width, height, CornerRadius);

            NativeMethods.SetWindowRgn(hWnd, roundRectRegion, NativeMethods.IsWindowVisible(hWnd));
        }