Home > Net >  User controls a jump for a panel to jump too much slow, could you tell me how to solve.
User controls a jump for a panel to jump too much slow, could you tell me how to solve.

Time:09-18

I have other code written in the book of the InitializeComponent (), also tried to code all deleted, double buffering and solve flicker also use, doublebuffer also set as truel, measured as because the panel is overmuch, cause a jump slow, excuse me what method can solve the panel has 25, reason for using a panel that is very convenient,

CodePudding user response:

Excuse me which bosses to give directions, recently didn't see a lot of method to solve online, main no more way,

CodePudding user response:

Thread the Thread=new System. When the Thread (the new System. The Threading. ThreadStart (()=& gt;
{
The Action act=delegate ()
{
Newform. SuspendLayout ();
Newform. GetType (). GetProperty (" DoubleBuffered, "System. Reflection. BindingFlags. Instance | System. Reflection. The BindingFlags. NonPublic). The SetValue (newform, true, null);
Newform. Visible=true;
Newform. Location=new Point (0, 0);
Newform. Size=this. Size;
Newform. BringToFront ();
At the bottom. BringToFront ();
At the top. BringToFront ();
Uc. The Dock=DockStyle. The Fill;//fill panel

This. Newform. Controls. The Add (uc);
This. Newform. ResumeLayout ();
};
Enclosing the Invoke (act);

}));
thread.Start();//start the thread

CodePudding user response:

This is the jump code above, the measured panel user controls jump slow too much,
  •  Tags:  
  • C#
  • Related