/// <summary>Disables the Aero "Blur Behind" effect.</summary> public static void DisableBlurBehind(IntPtr hWnd) { if (!OsSupport.IsVistaOrBetter || !OsSupport.IsCompositionEnabled) return; NativeMethods.BlurBehind bb = new NativeMethods.BlurBehind(); bb.dwFlags = NativeMethods.BlurBehindFlags.Enable; bb.fEnable = false; NativeMethods.DwmEnableBlurBehindWindow(hWnd, ref bb); }
/// <summary>Enable the Aero "Blur Behind" effect on a specific region. Background of the region must be black.</summary> public static void EnableBlurBehind(IntPtr hWnd, IntPtr regionHandle) { if (!OsSupport.IsVistaOrBetter || !OsSupport.IsCompositionEnabled) return; NativeMethods.BlurBehind bb = new NativeMethods.BlurBehind(); bb.dwFlags = NativeMethods.BlurBehindFlags.Enable | NativeMethods.BlurBehindFlags.BlurRegion; bb.fEnable = true; bb.hRgnBlur = regionHandle; NativeMethods.DwmEnableBlurBehindWindow(hWnd, ref bb); }
/// <summary>Disables the Aero "Blur Behind" effect.</summary> public static void DisableBlurBehind(IntPtr hWnd) { if (!OsSupport.IsVistaOrBetter || !OsSupport.IsCompositionEnabled) { return; } NativeMethods.BlurBehind bb = new NativeMethods.BlurBehind(); bb.dwFlags = NativeMethods.BlurBehindFlags.Enable; bb.fEnable = false; NativeMethods.DwmEnableBlurBehindWindow(hWnd, ref bb); }
/// <summary>Enable the Aero "Blur Behind" effect on a specific region. Background of the region must be black.</summary> public static void EnableBlurBehind(IntPtr hWnd, IntPtr regionHandle) { if (!OsSupport.IsVistaOrBetter || !OsSupport.IsCompositionEnabled) { return; } NativeMethods.BlurBehind bb = new NativeMethods.BlurBehind(); bb.dwFlags = NativeMethods.BlurBehindFlags.Enable | NativeMethods.BlurBehindFlags.BlurRegion; bb.fEnable = true; bb.hRgnBlur = regionHandle; NativeMethods.DwmEnableBlurBehindWindow(hWnd, ref bb); }