Solved

double right mouse click

Posted on 1998-12-02
14
301 Views
Last Modified: 2010-05-03
What is the routine for detecting a double-right mouse click?
0
Comment
Question by:boatboy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 2
  • +1
14 Comments
 
LVL 2

Expert Comment

by:cedricd
ID: 1447811
the dbl_click events
0
 
LVL 2

Expert Comment

by:cedricd
ID: 1447812
private sub control_dbl_click()

end sub
0
 

Author Comment

by:boatboy
ID: 1447813
BUT WHAT IS THE CODE TO DIFFERENCIATE A RIGHT DOUBLE CLICK FROM A LEFT DOUBLE CLICK?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Expert Comment

by:dabellei
ID: 1447814
Here's how to do it

Public right_mouse As Integer

Private Sub Form_DblClick()
    If right_mouse Then
        'do what ever you want here
    End If
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then
        right_mouse = True
    End If
End Sub


If you like my answer then just repost it for me
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1447815
Together with DblClick event, you must use MouseUp and/or MouseDown. It's only inside it where you receive an integer value whose bits tell you what button was pressed.
0
 

Author Comment

by:boatboy
ID: 1447816
BUT WHAT IS THE CODE TO DIFFERENCIATE A RIGHT DOUBLE CLICK FROM A LEFT DOUBLE CLICK?
0
 

Author Comment

by:boatboy
ID: 1447817
CEDRICD RESPONDED FIRST BUT ONLY STATED TO USE THE DBL CLICK EVENT WHICH IS TOO VAGUE AND INCOMPLETE.  

DABELLEI PROVIDED THE MOST COMPLETE ANSWER.  
0
 

Author Comment

by:boatboy
ID: 1447818
DABELLEI RESPOND AGAIN TO RECEIVE YOUR POINTS ON DETECTING A DOUBLE-RIGHT CLICK.
0
 

Author Comment

by:boatboy
ID: 1447819
DABELLEI, RESPOND AGAIN

MARK@MDSI-USA.COM
0
 

Author Comment

by:boatboy
ID: 1447820
DABELLEI, RESPOND AGAIN

MARK@MDSI-USA.COM
0
 
LVL 2

Accepted Solution

by:
dabellei earned 50 total points
ID: 1447821
Public right_mouse As Integer

Private Sub Form_DblClick()
    If right_mouse Then
        'do what ever you want here
    End If
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then
        right_mouse = True
    End If
End Sub

0
 
LVL 3

Expert Comment

by:vikiing
ID: 1447822
Deballei:

    Please, let me correct your code.

a) Variable "Right_Mouse" is not initialized; thus, once right button occurs, it will be True forever (there's nothing which sets variable to FALSE).

b) Variable "Button" (in Mouse events) is a binary-coded one, where there are several bits with different meaning. The way you code is valid ONLY if you want to check that bit <1> is set at "Button" AND ALL OTHERS are cleared.

A simple way to correct both problems would be:
    Right_Mouse=(Button and 2)<>0

0
 
LVL 2

Expert Comment

by:cedricd
ID: 1447823
Your question was also vague, you didn't precise where you want to use the dbl click.
the dbl click can be detected for all control using this events.
This events is started only when it's a dbl right click. (this is more simple then program a routine and execute the click events or the mouse down events ! )

so be it...
0
 

Author Comment

by:boatboy
ID: 1447824
.
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question