koossa
asked on
Datagridview flicker
I have added a DataGridView to my form, set the form to maximize and Doc the DataGridview to fill, with the following code
My problem is, when I press the mouse button, hold it in and move my mouse over the screen in circle movements, it is very slow and flicker as the selection changed.
Is there any way to get past this?
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim iRet As Integer
DataGridView1.AlternatingRowsDefaultCellStyle.ForeColor = Color.Red
DataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.Wheat
For i = 1 To 20
DataGridView1.Columns.Add("Col" & i, "Col" & i)
Next i
For j = 1 To 100
iRet = DataGridView1.Rows.Add()
For x = 1 To 20
DataGridView1.Rows(iRet).Cells(x - 1).Value = x * j
Next x
Next
End Sub
End Class
My problem is, when I press the mouse button, hold it in and move my mouse over the screen in circle movements, it is very slow and flicker as the selection changed.
Is there any way to get past this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, it seems like it is working!!!
Is that something your users will be doing frequently?