Solved

Left Click Popup Menu

Posted on 1998-10-11
2
402 Views
Last Modified: 2010-04-03
I want to attach a popup menu to the LEFT click of a button.  This would seem to be a fairly straightforward thing, but since the popupmenu property of the button only attaches to RIGHT clicks, and calling the popup method of the menu requires X and Y in absolute screen coordinates (which you have to calculate by taking form position, button position, mouse position, etc, and then taking into accound border widths, scrollbars, etc, this is just too complicated!

can anyone suggest a SIMPLE way of doing this? (ie LEFT click on the button to trigger the popup)

Thanks

Ben
0
Comment
Question by:1750
[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 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 total points
ID: 1342537
Ben,

Getting the screen coordinates is not as hard as you think. Look up ScreenToClient and ClientToScreen - one easy call gives you the coords you needs to pass to the popup call.

Hope this helps,

Raymond.
0
 

Author Comment

by:1750
ID: 1342538
Thanks, that will do nicely!
0

Featured Post

Industry Leaders: 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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

734 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