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 6 of 6

Disable shortcut keys

This is a discussion on Disable shortcut keys within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi All! Is it possible to disable the mappoint inbuilt shortcut keys behaviour. For instance, when pressing CTRL+R, the route ...

  1. #1
    pobe is offline Junior Member White Belt
    Join Date
    Oct 2005
    Posts
    5

    Disable shortcut keys

    Hi All!
    Is it possible to disable the mappoint inbuilt shortcut keys behaviour. For instance, when pressing CTRL+R, the route planner is launched. I don't want this.

    Best regards,
    pobe

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

    Yes, very simple, however it is depending on the programming language you use. For example in Delphi you have OnKeyDown event. You can do there what you want. C# has something similar (dont know in top of my head).

  3. #3
    pobe is offline Junior Member White Belt
    Join Date
    Oct 2005
    Posts
    5
    Hi Wilfried,
    thanx for your reply. I am using C#, however I can't figure out how to catch the KeyKown event for the MapPoint Control. When the MapPoint control has the focus it consumes the key messages and leaves me no chance to control them.

    I have tried to set the KeyPreview property of the main form (which is the parent of the MapPoint ActiveX) to true, and I override the ProcessKeyPreview method. Still no luck when the MapPoint control gets the focus.

    The poor solution I have come up with so far is to manually set the focus to the main form as soon as the MapPoint control gets focused. I guess this is rather ugly, but at this moment I have no better idea.

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

    Set KeyPreview to True and in ONKeyDown you can set following code (you can check first what key is pressed eventually):

    Code:
            private void Main_KeyDown(object sender, KeyEventArgs e)
            {
                e.SuppressKeyPress = true;
            }

  5. #5
    pobe is offline Junior Member White Belt
    Join Date
    Oct 2005
    Posts
    5
    Hi,
    I'm still not getting the event when the MapPoint ActiveX has the focus. Your solution works great as long as the focus is at any other control of the app, but then the original problem (to prevent the "Ctrl+" shortcuts of MapPoint from popping up) is not an issue at all.


    Thanks anyway!

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

    Maybe a workaround is following: When the control gets focus, place the focus on another control and then it works ?

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 to disable help in activeX
    By prynel_laurent in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 03-23-2006, 03:05 PM
  3. Is there anyway to disable the MAppoint help
    By kwargo in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 03-08-2004, 02:58 PM
  4. Disable save
    By Dazzer in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-28-2003, 05:30 AM
  5. Disable DW.EXE
    By Wim in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 01-25-2003, 07:40 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