Solved

Displaying my context menu with a left click

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CISCO WIFI 6 73
What are the recommended security measures to put in place? 19 94
office 2016 license quastion 3 45
ISeries Remote Location Route entry 2 28
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

752 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