MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Context menu disabled and Arrow of direction still actived ?

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-21-2006
Junior Member
White Belt
 
Join Date: Nov 2006
Location: Marseille, France
Posts: 9
Talking I succeded in context menu disabling. But the Arrow of direction are disabled.

I succeeded in disabling the right context menu (BeforeClick and e.cancel=true), but, then, it's not possible any more to use the Arrow (The on which are roll over on map's border and which enable move on map).

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 11-21-2006
Junior Member
White Belt
 
Join Date: Nov 2006
Location: Marseille, France
Posts: 9
Talking Re: Context menu disabled and Arrow of direction still actived ?

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;
    }
}
Don't forget to declare the event handler in the form constructor :

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
actived, arrow, context, direction, disabled, menu


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/context-menu-disabled-arrow-direction-still-actived-5379.html

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 06:40 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54