public static void RemoveGlassRegion(ref IntPtr handle) { if (IsGlassAvailable()) { var bb = new WinAPI.BbStruct { Enable = false, Flags = WinAPI.BbFlags.DwmBbEnable | WinAPI.BbFlags.DwmBbBlurregion, Region = IntPtr.Zero }; WinAPI.DwmEnableBlurBehindWindow(handle, ref bb); } }
public static void MakeGlassRegion(ref IntPtr handle, IntPtr rgn) { if (IsGlassAvailable() && rgn != IntPtr.Zero) { var bb = new WinAPI.BbStruct { Enable = true, Flags = WinAPI.BbFlags.DwmBbEnable | WinAPI.BbFlags.DwmBbBlurregion, Region = rgn }; WinAPI.DwmEnableBlurBehindWindow(handle, ref bb); } }