I have an app that has a ton of controls on it. And it has a massive amount of flicker, particularly on startup.
I applied this fix to it.
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // WS_EX_COMPOSITED
return cp;
}
}
This worked great - the flickering was reduced by a pretty unbelievable amount. However, the side effect is that the Minimize, Maximize and the Close buttons in the top right of the window don't animate when I move the mouse over or click on them (they still work though). This gives the app a hung feel.
How do I keep the WS_EX_COMPOSITED while still retaining the usability of Maximize, Minimize and Close buttons?
This happens on Windows XP. As @fallenidol pointed out, this is not an issue on Windows 7.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…