Solved

Left Click Popup Menu

Posted on 1998-10-11
2
373 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now