0

I have searched it on internet and on stackoverflow as well but i haven't got any correct/reliable solution.

I want to remove flickering from one of my c# Windows Form.

So I have overriden CreateParams method in following manner

    protected override CreateParams CreateParams
    {
        get
        {
            CreateParams cp = base.CreateParams;
            cp.ExStyle |= 0x02000000;  // Turn on WS_EX_COMPOSITED
            return cp;
        }
    }

This removes flicker from my Application when used in Vista, Windows 7 and 8. But in XP my controls are randomly changed. My checkboxes becomes invisible.

I have referred the stack over flow question this. But i cannnot use it as I dont have any MaximizeBox. This is happening in a used defined control ! Please suggest me a feasible solution

  • possible duplicate of [How to fix the flickering in User controls](http://stackoverflow.com/questions/2612487/how-to-fix-the-flickering-in-user-controls) – stuartd Mar 18 '15 at 11:37
  • 1
    I'm not aware of an XP specific failure mode. Just punt the problem, XP users have low expectations anyway. Only set the flag if (Environment.OSVersion.Version.Major >= 6). Attribution is required here btw. – Hans Passant Mar 18 '15 at 12:10

0 Answers0