private static bool SetBlurBehindWindow(ref IntPtr handle, bool enabled) { BlurBehind bb = new BlurBehind() { Enabled = enabled, Flags = BlurBehindFlags.DWM_BB_ENABLE | BlurBehindFlags.DWM_BB_BLURREGION, Region = IntPtr.Zero }; if (NativeMethods.DwmEnableBlurBehindWindow(handle, ref bb) != 0) { return(false); } return(true); }
internal static extern int DwmEnableBlurBehindWindow(IntPtr hWnd, ref BlurBehind BlurBehind);