添加一个类,第二个效果更好,然后修改 Form1.Designer.vb
如果修改程序集名称的话,先F5调试程序,然后就可以打开Form1窗口了。
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
Public Class DoubleBufferListView Inherits System.Windows.Forms.ListView Public Sub DoubleBufferListView() SetStyle(ControlStyles.OptimizedDoubleBuffer Or ControlStyles.AllPaintingInWmPaint, True) SetStyle(ControlStyles.EnableNotifyMessage, True) End Sub Protected Overrides Sub OnNotifyMessage(ByVal m As Message) If (m.Msg <> &H14) Then MyBase.OnNotifyMessage(m) End If End Sub End Class
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
Public Class DoubleBufferListView Inherits System.Windows.Forms.ListView Public Sub New() MyBase.New() DoubleBuffered = True End Sub End Class