Exemple #1
0
 public static void EnableBlurBehindWindow(IntPtr windowHandle, bool enable)
 {
     try
     {
         if (DwmApi.DwmIsCompositionEnabled())
         {
             BlurBehindInformation BlurBehindInformation = new BlurBehindInformation(enable, IntPtr.Zero);
             DwmApi.DwmEnableBlurBehindWindow(windowHandle, ref BlurBehindInformation);
             return;
         }
         else
         {
             //Glass effect is not enabled -> do nothing
             return;
         }
     }
     catch (DllNotFoundException)
     {
         return;
     }
 }
Exemple #2
0
 private static extern void DwmEnableBlurBehindWindow(IntPtr windowHandle, ref BlurBehindInformation blurBehindInformation);