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

后端 未结 9 1938
情话喂你
情话喂你 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 03:57

    We've experienced a similar problem using .NET 3.0 and DataGridView on a dual monitor system.

    Our application would display the grid with a gray background, indicating that the cells could not be changed. Upon selecting a "change settings" button, the program would change the background color of the cells white to indicate to the user that the cell text could be changed. A "cancel" button would change the background color of the aforementioned cells back to gray.

    As the background color changed there would be a flicker, a brief impression of a default sized grid with the same number of rows and columns. This problem would only occur on the primary monitor (never the secondary) and it would not occur on a single monitor system.

    Double buffering the control, using the above example, solved our problem. We greatly appreciated your help.

提交回复
热议问题