Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

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

  1. #1
    noreli is offline 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.

  2. #2
    noreli is offline 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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Disable Context menu
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 12
    Last Post: 12-23-2008, 01:05 PM
  2. How can I show arrow symbols to indicate direction?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-23-2005, 01:43 PM
  3. Custom context menu
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 09-10-2004, 11:15 PM
  4. VB.NET & overriding the map point context menu...
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-05-2002, 09:25 AM
  5. Is it possible to disabled the context menus that ....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-19-2002, 05:20 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96