Completely Remove flickering due to TableLayoutPanel & Panel in windows form go as follows:=-
1. Set double buffered property of Form =true.
2. Paste Following 2 functions in form.cs
#region .. Double Buffered function ..
public static void SetDoubleBuffered(System.Windows.Forms.Control c)
{
if (System.Windows.Forms.SystemInformation.TerminalServerSession)
return;
System.Reflection.PropertyInfo aProp = typeof(System.Windows.Forms.Control).GetProperty("DoubleBuffered", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
aProp.SetValue(c, true, null);
}
#endregion
#region .. code for Flucuring ..
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
#endregion
3. Call SetDoubleBuffered(“TableLaoutPannel_controlName”) for each TableLayoutPannel,Pannel, Splitcontainer, Datagridview & all container controls.