Horrible redraw performance of the DataGridView on one of my two screens

后端 未结 9 1955
情话喂你
情话喂你 2020-11-28 03:30

I\'ve actually solved this, but I\'m posting it for posterity.

I ran into a very odd issue with the DataGridView on my dual-monitor system. The issue manifests its

9条回答
  •  感动是毒
    2020-11-28 04:00

    Here is some code that sets the property using reflection, without subclassing as Benoit suggests.

    typeof(DataGridView).InvokeMember(
       "DoubleBuffered", 
       BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.SetProperty,
       null, 
       myDataGridViewObject, 
       new object[] { true });
    

提交回复
热议问题