1
如何將光標箭頭更改爲手形。我有10列,我想改變第一列的光標。DataGridView更改光標所選行
如何將光標箭頭更改爲手形。我有10列,我想改變第一列的光標。DataGridView更改光標所選行
如果index = firstColumn然後
光標= Cursors.hand
ENDIF
如果依靠CellMouseEnter
事件,你可以很容易地得到你想要的東西。這裏有一個DataGridView1
的工作代碼和第1列:
Private Sub DataGridView1_CellMouseEnter(sender As Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellMouseEnter
If (e.ColumnIndex = 0) Then
Cursor = Cursors.Hand 'Different cursor when the mouse is over a cell belonging to column 1
Else
Cursor = Cursors.Default
End If
End Sub