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
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 ...
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
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).
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
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.
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; }
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
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!
Hi,
Maybe a workaround is following: When the control gets focus, place the focus on another control and then it works ?
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
There are currently 1 users browsing this thread. (0 members and 1 guests)