I have a form in which I load a user control that contains 3 other user controls in it.
Every time I move to another tab and return to that user control the 3 controls inside it flickers even befor any event fires.
I tried every thing including:
this.DoubleBuffered = true;
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
and
protected override CreateParams CreateParams
{
get
{
CreateParams baseParams = base.CreateParams;
baseParams.ExStyle |= 0x0200000;
return baseParams;
}
}
and
protected override CreateParams CreateParams
{
get
{
CreateParams baseParams = base.CreateParams;
baseParams.ExStyle &= 0x0200000;
return baseParams;
}
}
But nothing helps. The flickering happens befor any code runs.
What can be the problem?