Community of VE/MapPoint Users and Developers
This is a discussion on Context menu disabled and Arrow of direction still actived ? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I succeeded in disabling the right context menu (BeforeClick and e.cancel=true), but, then, it's not possible any more to use ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| I have an idea on how to do it : I analyse the position of mouse. and I e.cancel only when X,Y are on border's map. But that's a bit dirty and what if the map is reduced with a sub window (like the directions subscreen) ? Any one, has an idea ? PS : I use C#, VS2005 Last edited by noreli; 11-21-2006 at 05:26 PM. |
| |||
|
I found the answer by myself... I just have to check in the event.button property if the right button is click. The value for Right button is 2. The code of the handler is : Code:
private void axMappointControl1_BeforeClick(object sender, AxMapPoint._IMappointCtrlEvents_BeforeClickEvent e)
{
if (e.button == 2)
{
e.cancel = true;
}
}
Code: public Form1()
{
InitializeComponent();
axMappointControl1.NewMap(MapPoint.GeoMapRegion.geoMapEurope);
axMappointControl1.BeforeClick += new AxMapPoint._IMappointCtrlEvents_BeforeClickEventHandler(axMappointControl1_BeforeClick);
}
[/code] Last edited by noreli; 11-21-2006 at 05:26 PM. |
![]() |
| Tags |
| actived, arrow, context, direction, disabled, menu |
| ||||
| Posted By | For | Type | Date | |
| Formatting coordinates with DmsFormat, linking to weather data, three new utilities - MP2K Update Archives - MP2K Magazine | This thread | Refback | 11-23-2006 12:06 PM | |
| Microsoft MapPoint 2006 - MP2K Magazine | This thread | Refback | 11-21-2006 11:14 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disable Context menu | Anonymous | MapPoint 2006/2009 Discussion | 10 | 05-27-2005 02:03 PM |
| How can I show arrow symbols to indicate direction? | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-23-2005 01:43 PM |
| Custom context menu | Anonymous | MapPoint 2006/2009 Discussion | 3 | 09-10-2004 11:15 PM |
| VB.NET & overriding the map point context menu... | Anonymous | MapPoint 2006/2009 Discussion | 0 | 09-05-2002 09:25 AM |
| Is it possible to disabled the context menus that .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 06-19-2002 05:20 AM |