Community of VE/MapPoint Users and Developers
This is a discussion on BeforeClick (or MouseClick) determine if a specific key is pressed? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hey everyone. I'm using Mappoint 2006 and Visual Basic 2005. What I'm trying to determine is if there is a ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| BeforeClick (or MouseClick) determine if a specific key is pressed? So, let's say if a user clicks on a Pushpin, the first thing I want to know is if the Ctrl key is currently depressed? If yes, then do something. If not, do what Mappoint normally does. Is this possible? Thank you in advance for any and all help that you can give. It is very much appreciated. |
| |||
| Re: BeforeClick (or MouseClick) determine if a specific key is pressed?
You could use this API function to examine the key state: SHORT GetKeyState(int nVirtKey) // virtual-key code; Where nVirtKey is VK_SHIFT (Shift Key), VK_CONTROL (Ctrl Key), and VK_MENU (Alt Key) If the function succeeds, the return value specifies the status of the given virtual key. If the high-order bit is 1, the key is down; otherwise, it is up. If the low-order bit is 1, the key is toggled. The key status returned from this function changes as a given thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the GetAsyncKeyState function (same syntax) to retrieve that information. |
| |||
| Re: BeforeClick (or MouseClick) determine if a specific key is pressed?
Hi, there is a shift property in the event handler's argument. You can set there a bitmask to check if shift, alt, or ctrl (or combination) is pressed.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| ||||
| Posted By | For | Type | Date | |
| Untitled document | This thread | Refback | 07-21-2008 07:12 PM | |
| BeforeClick (or MouseClick) determine if a specific key is pressed? - MapPoint Forums | This thread | Refback | 04-03-2008 07:13 PM | |
| Making Pushpin Locations Immoveable - MapPoint Articles - MP2K Magazine | This thread | Refback | 04-01-2008 11:47 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BeforeClick event cancel not working with VC++ | mayfly | MapPoint 2006/2009 Discussion | 3 | 05-05-2007 11:13 AM |
| beforeclick event | mmartin | MapPoint 2006/2009 Discussion | 2 | 04-13-2007 06:36 AM |
| Determine if Map has been closed | BirdIslander | MapPoint 2006/2009 Discussion | 1 | 12-07-2005 01:33 PM |
| Determine if a polyline is closed? | Anonymous | MapPoint 2006/2009 Discussion | 4 | 03-29-2005 11:37 AM |
| Is there a way to determine the minimum distance b.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 01-22-2002 04:45 AM |
Cheap Flights Turkey
Cheap flights to Turkey are a reality when you book online with Holiday Hypermarket. Discover Turkish delights with Turkish cheap flights.
Travel Specialist
Travel Counsellors is a leading travel specialist. We are a Queen's Award winning travel agency.
Holiday in Portugal
A holiday in Portugal is low cost but great value when you book with us online. Transportation and accommodation are excellent and very reasonable too.
Holidays to Antigua
The Holiday Place has fantastic deals on holidays to Antigua. Visit our website to view special offers on holidays to the Caribbean.
Holiday
Searching for the perfect holiday? Well check out ULookUBook online to find out all about your destination and also to book a great value holiday.
Compare holiday prices
Compare holiday prices online where you can see all the possibilities at Travel.co.uk
Cheap Holidays in Lanzarote
Now's the time to get up and go visit the Canary Islands! View cheap holidays in Lanzarote only at On The Beach.