Solved

Displaying my context menu with a left click

Posted on 2000-03-02
5
219 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…

762 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