SMALL

using System.Reflection; // 더블버퍼링 하기 위해서 추가

 

namespace 네임스페이스이름
{
    public partial class Form1 : Form
    {
        public formReservation()
        {
            InitializeComponent();

 

            dataGridView1.DoubleBuffered(true);       // 확장하기

        }

    }

 

   
    public static class ExtensionMethods    // DoubleBuffered 메서드를 확장
    {
        public static void DoubleBuffered(this DataGridView dgv, bool setting)
        {
            Type dgvType = dgv.GetType();
            PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetProperty);
            pi.SetValue(dgv, setting, null);
        }
    }

} 네임스페이스 닫기

LIST

'일반' 카테고리의 다른 글

static  (0) 2022.02.23
그라파나설정  (0) 2022.02.22
차트 타이틀 설정  (0) 2022.02.21
차트공부2  (0) 2022.02.18
차트공부1  (0) 2022.02.18

+ Recent posts