1. winform控件的双缓冲。控件的双缓冲属性是隐藏的,可以通过反射改变其属性值。
    lv.gettype().getproperty("doublebuffered", bindingflags.instance | bindingflags.nonpublic).setvalue(lv, true, null);
    //lv为控件名称

     

  2. 重绘控件的时候开启控件双缓冲。
    this.setstyle(controlstyles.doublebuffer | 
    
          controlstyles.userpaint | 
          controlstyles.allpaintinginwmpaint,
          true);
    this.updatestyles();

     

  3. 通过消息,禁用掉清除背景的消息。(treeview控件实用)
    protected override void wndproc(ref message m)
      {
          if (m.msg == 0x0014) // 禁掉清除背景消息
              return;
          base.wndproc(ref m);
      }