[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mouse.Button , ensure correct right button value


Il 02/04/24 14:20, Bruce Steers ha scritto:
Private $iRight As Integer = -1

Public Sub Form_MouseDown()

   If $iRight = -1 Then
   Select Mouse.Button
     Case 2
       If Mouse.Right And If Not Mouse.Middle Then $iRight = 2 Else
$iRight = 3
     Case 3
       If Mouse.Right And If Not Mouse.Middle Then $iRight = 3
   End Select
   Endif

End

Then once $iRight is not -1 i know exactly what Mouse.Button is right click

maybe you will find safer:

Public Sub Form_MouseDown()

  If Mouse.Left And If Mouse.Right Then Return
  If Mouse.Left Then
    Print "You pressed on the left button!"
    Return
  Else If Mouse.Right Then
    Print "You pressed on the right button!"
    Return
  Endif

End

Regards
Gianluigi


Follow-Ups:
Re: Mouse.Button , ensure correct right button valueBruce Steers <bsteers4@xxxxxxxxx>
References:
Mouse.Button , ensure correct right button valueBruce Steers <bsteers4@xxxxxxxxx>
Re: Mouse.Button , ensure correct right button valueGianluigi <gradobag@xxxxxxxxxxx>
Re: Mouse.Button , ensure correct right button valueBruce Steers <bsteers4@xxxxxxxxx>