添加项目文件。

This commit is contained in:
liang123456a
2025-09-04 11:25:09 +08:00
parent e4bcaa7336
commit a1301ee8ce
7 changed files with 787 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
using System;
using System.Reflection;
using System.Windows.Forms;
public class FastDataGridView : DataGridView
{
public FastDataGridView()
{
// 通过反射开启 DataGridView 的 DoubleBuffered 属性
typeof(DataGridView)
.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic)
.SetValue(this, true, null);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.UserPaint, true);
}
}