在构造方法中加上如下代码

 

public Form1()
{
       InitializeComponent();
       SetStyle(ControlStyles.UserPaint, true);
       SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
       SetStyle(ControlStyles.DoubleBuffer, true); // 双缓冲

}

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
相关资源
相似解决方案