Solved

Displaying my context menu with a left click

Posted on 2000-03-02
5
223 Views
Last Modified: 2008-03-17
A button in my application has a shortcut menu associated with it.
This menu is opened when the button is right-clicked.

How can I change this so that clicking with the left button also opens the menu??

I cannot find any On RButtonDown or equivalent method any ideas guys and gals?
0
Comment
Question by:neilhoman
[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
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:brewdog
ID: 2577083
So if the user clicks either button anywhere in the app, you want the menu to pop up? Wouldn't you want the menu just in certain places with the left mouse? Otherwise users will never be able to click command buttons, etc. . . .
0
 
LVL 54

Expert Comment

by:nico5038
ID: 2577588
Can't figure out why this right-click is button-bound?
Is the short-cut menu only visible when this button is right clicked or also when you right-click anywhere else?
On my forms a right-click normally shows the filter-menu!
Perhaps it would help if you would show the code 'behind' the button.
0
 

Author Comment

by:neilhoman
ID: 2579710
Sorry for taking so long to reply my email notification or the account itself does not seem to be working.....

First of all I created a button. Now when I press this button I want to show a context menu.
So I went about setting one up using the customise toolbar menu. I made it a shortcut menu.

Now in the properties for the button I set the shortcut menu property to the name of my shortcut menu.

So now when I right click on the button my shortcut menu is displayed. Only problem is - I want the shortcut menu to be displayed when I Left click on the button as well.

To do this in C++, as I was saying, you would simply add a handler for Left_Button_Click and from there (to call the shortcut menu) I would simply place a call to the RButton down() function to evoke the handler code for the rightmouse click (from the left mouse handler) executing the right_mouse click code effectively showing my shortcut menu.

Thing is I dont know how to do it in access.

Sorry for not being clear in my first description.
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 10 total points
ID: 2580017
Try for a button named Command45:

Private Sub Command45_Click()
    SendKeys "+{F10}"
End Sub
0
 

Author Comment

by:neilhoman
ID: 2580353
Bit of a work around but thanks very very much Nico..... keep up d good work!
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

626 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