I have added three images to ImageList..I want to show tooltip....On listview item...
Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListView1.View = View.LargeIcon
ListView1.LargeImageList = ImageList1
For lcount As Integer = 1 To 3
ListView1.Items.Add(lcount.ToString, lcount - 1)
Next
End Sub
Private Sub ListView1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.MouseLeave
Dim a As New ToolTip
a.SetToolTip(ListView1, "")
End Sub
Private Sub ListView1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseMove
Dim thisItem As ListViewItem = ListView1.GetItemAt(e.X, e.Y)
Dim a As New ToolTip
If Not thisItem Is Nothing Then
a.SetToolTip(ListView1, thisItem.Text)
Else
a.SetToolTip(ListView1, "")
End If
End Sub
End Class
Mine code is working fine..But probs is that..as i hover the mouse suppose over the first image tooltip is shown..Now when i hover the mouse on second image..first image tooltip is still there..I want first tooltip to be disappeared...How to do that..can somebody tell me help me??/