Hello,
I've a DataGrid on a form and I need to change the cursor from Default to Help when a user moves the mouse over a certain column of the DataGrid. I've the following code but is not working:
The error message that I receive is:
"Object reference not set to an instance of an object"
Can annyone help please?
Thanks,
João Pinto
I've a DataGrid on a form and I need to change the cursor from Default to Help when a user moves the mouse over a certain column of the DataGrid. I've the following code but is not working:
Code:
Private Sub DataGridView1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.MouseHover
If DataGridView1.CurrentCell.ColumnIndex = 7 Then
DataGridView1.Cursor = Cursors.Help
End If
End Sub
The error message that I receive is:
"Object reference not set to an instance of an object"
Can annyone help please?
Thanks,
João Pinto