Ejemplo n.º 1
0
 /// <summary>Determines if the composition is currently enabled for the desktop.</summary>
 /// <returns>The <see cref="bool" />.</returns>
 public static bool IsCompositionEnabled()
 {
     // Desktop composition is only available on Vista upwards
     if (Environment.OSVersion.Version.Major < 6)
     {
         return(false);
     }
     else
     {
         // Ask the desktop window manager is composition is currently enabled
         bool compositionEnabled;
         Dwmapi.DwmIsCompositionEnabled(out compositionEnabled);
         return(compositionEnabled);
     }
 }
Ejemplo n.º 2
0
 public static bool IsDwmEnabled()
 {
     return(Environment.OSVersion.Version.Major >= 6 && Dwmapi.DwmIsCompositionEnabled());
 }