471,047 Members | 1,197 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,047 software developers and data experts.

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 5172
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.