Solved

Left Click Popup Menu

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

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