C# 控件(元件)改變大小時閃爍問題
C# 控件(元件)改變大小時閃爍問題
資料來源: https://learn.microsoft.com/zh-tw/dotnet/desktop/winforms/advanced/how-to-reduce-graphics-flicker-with-double-buffering-for-forms-and-controls?view=netframeworkdesktop-4.8
https://blog.csdn.net/shu19880720/article/details/105789268
把下面程式碼放在表單建構子
//--- //C#控件改变大小时闪烁问题 SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.AllPaintingInWmPaint, false); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.UpdateStyles(); //---C#控件改变大小时闪烁问题