I have a datagridview and a timer on it.
This timer refreshes every 12 seconds.
Whenever i use the horizontal scroll if the mouse button is pressed ,the datagridview crashes and i have to restart teh application.
This is the code i have in the timer tick event.
Private Sub Sh_Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Sh_Timer1.Tick
Do While Not bFormClose
If MouseButtons = Windows.Forms.MouseButtons.None Then #### if mouse is not pressed
If Not bRowBeingEdited Then #### if row is not being edited
refreshDGVMethod() #### refresh the datagrid.
ElseIf MouseButtons = Windows.Forms.MouseButtons.Left Then
Not sure why i am getting the problem.I do not have anything written in the scroll event.