*참조 선언
using System.Reflection;
// 클래스 선언
public static class ControlHelper
{
public static void SetDoubleBuffered(this DataGridView ctrl, bool setting)
{
Type dgvType = ctrl.GetType();
PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
pi.SetValue(ctrl, setting, null);
}
}
// 호출방법
dataGridView1.SetDoubleBuffered(true);
'C#.Net' 카테고리의 다른 글
C#에서 MS Access 파일 압축 (0) | 2024.07.28 |
---|---|
Thread.Sleep과 Task.Delay 설명 (출처: 디씨인사이드 갤러리) (0) | 2024.07.16 |
c# ADOX.Create 시 클래스가 등록되지 않았습니다 예외 해결 (0) | 2024.04.17 |
C# Invoke를 사용해 크로스 스레드 문제를 해결하는 방법[퍼옴] (0) | 2024.04.02 |
소켓 프로그래밍. (Socket Programming)[퍼옴] (0) | 2024.03.21 |