ListView ItemActivate Delay
2 answers
I haven't found a way to change this delay, it's a built-in setting.
The problem is that the MouseDown event actually has a delayed response, setting only the SelectedItems property after .
You need to do it manually: use the MouseClick event. This fires if the item is clicked, even if it is already selected. It won't fire when empty space is clicked.
Private Sub list_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles list.MouseClick
Dim item As ListViewItem = list.GetItemAt(e.X, e.Y)
If Not IsNothing(item) Then
do your stuff here
End If
End Sub
You can simulate hot tracking by handling this event
Private Sub list_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles list.MouseMove
Dim item As ListViewItem = list.GetItemAt(e.X, e.Y)
If Not IsNothing(item) Then
list.SelectedItems.Clear()
item.Selected = True
End If
End Sub
+4
a source to share