Example #1
0
 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);
     }
 }
Example #2
0
 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);
     }
 }