Private Sub DataGridView1_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataGridView1.MouseHover Dim grvScreenLocation As Point = DataGridView1.PointToScreen(DataGridView1.Location) Dim tempX As Integer = DataGridView.MousePosition.X - grvScreenLocation.X + DataGridView1.Left Dim tempY As Integer = DataGridView.MousePosition.Y - grvScreenLocation.Y + DataGridView1.Top Dim hit As DataGridView.HitTestInfo = DataGridView1.HitTest(tempX, tempY) Dim cellX As Integer = hit.RowIndex Dim cellY As Integer = hit.ColumnIndex If cellX >= 0 And cellY >= 0 Then MsgBox(cellX & " - " & cellY) End If End Sub
' Doit être à True pour autoriser l'utilisation des infosBulles Me.DataGridView1.ShowCellToolTips = True ' Pour mettre une infoBulle sur ta première cellule par exemple Me.DataGridView1.Item(0, 0).ToolTipText = "ceci est un essai"
11 mars 2014 à 10:26
Merci beaucoup
11 mars 2014 à 10:38
(en cliquant sur le lien en haut sous le titre de ta question).