CreateParams and XP

352 views Asked by At

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

0

There are 0 answers