[DllImport("dwmapi.dll", SetLastError = true)] public static extern int DwmIsCompositionEnabled( [MarshalAs(UnmanagedType.Bool)] out bool pfEnabled );
Microsoft documentation: Link
Last updated 2 months ago