c#控件重绘的问题

1.当Panel有背景图像的时候,往Panel添加控件(带图像),画面会非常闪烁,所以,Panel尽量不要带背景图像

2.带背景图像可以参考designer.cs里面的写法。。。

添加Control之前

           this.panelContainer.SuspendLayout();
            this.panelBTL.SuspendLayout();
            this.SuspendLayout();

    .............添加控件代码

 

            this.panelContainer.ResumeLayout(false);
            this.panelContainer.PerformLayout();
            this.panelBTL.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

posted @ 2015-05-26 16:12  大侠的哥哥是菜鸟  阅读(1735)  评论(1编辑  收藏  举报