Your question, your audience. Choose who sees your identity—and your question—with question security.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
" The idea is to wait with starting the DoDragDrop event until the doubleclick event should have fired, if that hasn't fired, then do it. The code, in case other people run into the same problem:
Class variable
Private IsWaitingForDoubleClick As Boolean
Set during load (Add a timer first)
Timer1.Interval = SystemInformation.DoubleCl
Private Sub DocList_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.Mouse
If Not e.Button = MouseButtons.Left Then Return
StartWaitForDoubleClick()
End Sub
Private Sub DocList_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.Mouse
EndWaitForDoubleclick()
End Sub
Private Sub StartWaitForDoubleClick()
'This remains true until the timer fires, or the mouse button is released
IsWaitingForDoubleClick = True
Timer1.Enabled = True
End Sub
Private Sub EndWaitForDoubleclick()
IsWaitingForDoubleClick = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If IsWaitingForDoubleClick Then
IsWaitingForDoubleClick = False
StartDragDrop()
End If
sender.Enabled = False
End Sub
Private Sub StartDragDrop()
DocList.DoDragDrop(DocList
End Sub
This way the mouseClick and mouseDoubleClick events will fire as normally, and you can put any code you like into there."