On this MSDN page , you can discover Glass using DwmIsCompositionEnabled :
When the desktop composition state is changed, the WM_DWMCOMPOSITIONCHANGED message is broadcast. There are no parameters telling you if this is enabled or disabled, so it is up to you to call DwmIsCompositionEnabled if you are interested. The code to perform the verification is simple - the complex part decides how you want to see if the composition is disabled.
[DllImport("dwmapi.dll", PreserveSig = false)] public static extern bool DwmIsCompositionEnabled();
However, I'm not sure that you can “Enable Aero”, but “Disable Glass”, and if so, what will be the result of this method.
Danny tuppeny
source share