/// <summary> /// Disables the Aero "Blur Behind" effect. /// </summary> public static void DisableBlurBehind(IntPtr hWnd) { if (!OsSupport.IsVistaOrLater || !OsSupport.IsCompositionEnabled) { return; } var bb = new DwmBlurBehind { fEnable = false, dwFlags = DwmBlurBehindFlags.Enable }; DwmMethods.DwmEnableBlurBehindWindow(hWnd, ref bb); }
/// <summary> /// Enable the Aero "Blur Behind" effect on the whole client area. /// Background of the clint area must be painted in black. /// </summary> public static void EnableBlurBehind(IntPtr hWnd) { if (!OsSupport.IsVistaOrBetter || !OsSupport.IsCompositionEnabled) { return; } var bb = new DwmBlurBehind { fEnable = true, hRgnBlur = IntPtr.Zero, dwFlags = DwmBlurBehindFlags.Enable }; DwmMethods.DwmEnableBlurBehindWindow(hWnd, ref bb); }