- Thread starter
- #21
Aha, that is a good one! And I'm still on win7 so I'm going to check that out!
Thanks so much!
Thanks so much!
public static void FixDwm()
{
if (!OSInfo.OSInfo.Win8OrLater())
{
try
{
int dwmEnabled = 0;
DwmIsCompositionEnabled(ref dwmEnabled);
if (dwmEnabled > 0)
{
Log.Debug("CycleRefresh: DWM Detected, performing shenanigans");
ThreadStart starter = KillFormThread;
var killFormThread = new Thread(starter) {IsBackground = true};
killFormThread.Start();
}
}
catch (Exception ex)
{
Log.Error("CycleRefresh: FixDwm exception {0}", ex);
}
}
}