1

i have below form where i have several controls in Tablayout panel, as show in image.

enter image description here

its taking too long time(and also flicker) when i load this form.

i tried : i select CellBorderStyle as a 'None' so, that moment i didnt observe this issue, but the moment i choose any cellBorder style apart from 'None' its appears.

PS; i didn't perform any operation while form loading. just trying to load initial form.

VARUN NAYAK
  • 656
  • 5
  • 15
  • 36
  • Don't post the answer as part of the question, it make the current accepted answer nonsense and makes the post confusing. You have accepted an answer and it's enough for the post. If you are going to have a more complete answer, post an answer using Post Your Answer button. – Reza Aghaei Oct 27 '17 at 13:49
  • @RezaAghaei i removed answer from question. Thank you. – VARUN NAYAK Oct 30 '17 at 07:41
  • Great! Much better now :) – Reza Aghaei Oct 30 '17 at 09:53

2 Answers2

1

Try DoubleBuffered property to avoid flickering. You will have to create a subclass from TableLayoutPanel to set the DoubleBuffered property to true.

Tor
  • 633
  • 5
  • 14
1

Below is Complete answer as Tor suggested .

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);
}

i called upperfunction from form Constructor

SetDoubleBuffered("tablayoutPanelName");
VARUN NAYAK
  • 656
  • 5
  • 15
  • 36