[DllImport("user32.dll")]
static extern bool LockWindowUpdate(IntPtr hWndLock);
pravate void dosomething()
{
LockWindowUpdate(panelContainer.Handle);
// Clear Panel
panelContainer.Controls.Clear();
// my temporary TextBox
TextBox myT ;
for (int lauf=0; lauf < 200; lauf++)
{
// Create New TextBox
myT = new TextBox();
// Add TextBox to the Panel
panelContainer.Controls.Add(myT);
}
// redraw the window
LockWindowUpdate(IntPtr.Zero);
}
缓解加载显示大量控件时闪烁和线条显示的问题
最新推荐文章于 2020-07-30 20:43:58 发布