Note This function is deprecated as of Windows 8. DWM can no longer be programmatically disabled.
[DllImport("dwmapi.dll", PreserveSig = false)]
public static extern void DwmEnableComposition(CompositionAction uCompositionAction);
[Flags]
public enum CompositionAction : uint
{
/// <summary>
/// To enable DWM composition
/// </summary>
DWM_EC_DISABLECOMPOSITION = 0,
/// <summary>
/// To disable composition.
/// </summary>
DWM_EC_ENABLECOMPOSITION = 1
}
<DllImport("dwmapi.dll")> _
Public Shared Sub DwmEnableComposition(ByVal uCompositionAction As CompositionAction)
End Sub
Public Enum CompositionAction As UInteger
DWM_EC_DISABLECOMPOSITION = 0
DWM_EC_ENABLECOMPOSITION = 1
End Enum
Do you know one? Please contribute it!
None.
Please add some!
public static void DisableAero(bool disable)
{
if (disable)
DwmEnableComposition(CompositionAction.DWM_EC_DISABLECOMPOSITION);
else
DwmEnableComposition(CompositionAction.DWM_EC_ENABLECOMPOSITION);
}