468,512 Members | 1,348 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

ListView Double Click not Firing

Tom
Hi

I have a listview with an event for mousemove and double click. Since
implementing a handler for the mousemove event the double click event
never gets fired, can anyone tell me how i should implement both, so
that they both get fired correctly:

....

Private Sub ListView_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles ListView.MouseMove

Dim DragData As New DataObject(ListView.SelectedItem(0))
DoDragDrop(DragData, DragDropEffects.Link)

End Sub
Private Sub ListView_DoubleClick(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles ListView.DoubleClick

'If nothing selected do nothing
If ListView.SelectedItems.Count = 0 Then Exit Sub

'Raise event for selected item
MsgBox(ListView.SelectedItems(0).Text)

End Sub

....

Thanks

Tom
Nov 20 '05 #1
1 5100
This goes about the DataView, but I guess it's the same problem for your
double-click:
http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q869q

Hope it helps you,

Pieter

"Tom" <Re**********@here.com> wrote in message
news:5e********************************@4ax.com...
Hi

I have a listview with an event for mousemove and double click. Since
implementing a handler for the mousemove event the double click event
never gets fired, can anyone tell me how i should implement both, so
that they both get fired correctly:

...

Private Sub ListView_MouseMove(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles ListView.MouseMove

Dim DragData As New DataObject(ListView.SelectedItem(0))
DoDragDrop(DragData, DragDropEffects.Link)

End Sub
Private Sub ListView_DoubleClick(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles ListView.DoubleClick

'If nothing selected do nothing
If ListView.SelectedItems.Count = 0 Then Exit Sub

'Raise event for selected item
MsgBox(ListView.SelectedItems(0).Text)

End Sub

...

Thanks

Tom

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Alex K. | last post: by
4 posts views Thread by perspolis | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.