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
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Disabling Mappoint context Menu

This is a discussion on Disabling Mappoint context Menu within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, My problem is that i try to disabling the context menu (right click) in the Map Control. Doing: if ...

  1. #1
    mapmap22 is offline Junior Member White Belt
    Join Date
    Apr 2009
    Posts
    4

    Disabling Mappoint context Menu

    Hi,

    My problem is that i try to disabling the context menu (right click)
    in the Map Control. Doing:

    if (e.button == MapPoint.GeoMouseButtonConstants.geoRightButton)
    e.cancel =
    true;

    But, i have a problem. This solution cancel all mouse action that i need
    for my application like the zoom with the right button (draw a rectangle with the right button then click inside to zoom).

    Anybody had this problem or can help me to hide the context menu but continue to have the same options like the zoom with Right Button.

    Thanks a lot!

    Nick

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Disabling Mappoint context Menu

    In the case of the zoom, the right-mouse button would still be down. You would be dragging a rectangle.

    Could you use an event handler to detect whether the right-mouse button is still down and handle it differently depending on whether it's opening a context menu or a zoom?

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    mapmap22 is offline Junior Member White Belt
    Join Date
    Apr 2009
    Posts
    4

    Re: Disabling Mappoint context Menu

    I don't think so, that's why i'm here searching for help about this!

    I tried few things but without succes!

    I tried to affect an empty context menu to the
    MapPoint Control Property: ContextMenuStrip
    But the context menu still appear with mine beside
    and the Z of my Context is deeper.

    Thanks for any help!

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Disabling Mappoint context Menu

    Hi,

    If you use this code in the "BeforeClick" event handler:

    Code:
        if (e.button == GeoMouseButtonConstants.geoRightButton)
            e.cancel = true;
    Then the zoom function with the left button is still available.

  5. #5
    mapmap22 is offline Junior Member White Belt
    Join Date
    Apr 2009
    Posts
    4

    Re: Disabling Mappoint context Menu

    If i use what u said, it disable all click events.
    When i want to use the Zoom with the right click drag, it
    doesn't work because the e.cancel cancel all click envents.

    Other suggestions?

    Thanks

  6. #6
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Disabling Mappoint context Menu

    Hi,

    But you can zoom (recangle and then click in it) with the left button. And with left button it is still enabled.

  7. #7
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Disabling Mappoint context Menu

    Wilfried - not with MapPoint 2009 I'm afraid. I think you have to use the left mouse button to draw a rectangle and zoom to it.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  8. #8
    mapmap22 is offline Junior Member White Belt
    Join Date
    Apr 2009
    Posts
    4

    Re: Disabling Mappoint context Menu

    No,

    Rigth button draw the rectangle then:
    - Left button in this rectangle = Zoom
    - Rigth button in this rectangle appears a special context menu

    Well, looks like there's no solution or that nobody found one.

    Thanks anyway guys!

  9. #9
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60

    Re: Disabling Mappoint context Menu

    When fiddling with the Right Mouse Button (adding my own popup menu), I chose to have a "mode" for my add-in. This was switched on/off using items on the Tools menu.

    Therefore a user could switch between MapPoint right mouse functionality or my right mouse functionality.


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  10. #10
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Disabling Mappoint context Menu

    Hi Erik,

    Thanks, I did not know. I had not yet delivered the new version. And I did not try to play around with it. I hope not too much of these things are changed.

    Richard, do you say that it can behave like the old version?

Page 1 of 2 12 LastLast

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. Disabling MapPoint Control Context Menu
    By Jonny1234 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-24-2007, 02:06 PM
  3. How to override the context menu of mappoint with VB
    By leely in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 11-24-2006, 03:50 AM
  4. Custom context menu
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 09-10-2004, 11:15 PM
  5. Extending MapPoint - How about the Context Menu Enhancements
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 02-10-2004, 10:38 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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127