-
Is there a way to determine which mouse button is causing the doubleclick? I have an imagebox that displays the image full size in another form upon doubleclick. However it responds to a double click of the right mouse button as well as left, and I only want the left doubleclick.
-
Try:
Code:
Private Sub Image1_DblClick()
If Button = 1 Then
'code
End If
End Sub
-
Button is not defined for doubleclick or click. Only MouseDown, MouseUp, and MouseMove. Any other ideas?
-
This worked for me:
Code:
Option Explicit
Private Const cnMsLft = 1
Private Const cnMsRt = 2
Private bMsClck As Byte
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Select Case Button
Case 1
bMsClck = 1
Case 2
bMsClck = 2
End Select
End Sub
Private Sub Image1_DblClick()
If bMsClck = 2 Then
MsgBox "DblClick Right"
'DblClick Processing
End If
End Sub
-
Thats an idea I hadn't thought of. Thanks