Hi @Mansour_Dalir ,
You are releasing the mouse capture in the MouseDown event handler, the doubleclick event cannot be fired normally.
You might consider using the e.clicks in MouseDown event handle to determine whether a click or a double-click is triggered
Private Sub FormMoveByListBox(sender As Object, e As MouseEventArgs) Handles Me.MouseDown, MyListBox.MouseDown
If e.Button = MouseButtons.Left And Me.WindowState <> FormWindowState.Maximized Then
If e.Clicks = 1 Then
MoveForm()
ElseIf e.Clicks = 2 Then
' Handle double-click events
End If
End If
End Sub
Best Regards.
Jiachen Li
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.