Community of VE/MapPoint Users and Developers
This is a discussion on How to avoid mapppoint control focus when pressing a Key within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I want to use several functional Keys for some special features of my Mappoint control application. However, I cannot avoid ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| How to avoid mapppoint control focus when pressing a Key |
| ||||
|
You'll probably have to use a API function to trap for the keypress. The mappoint control does not have a keypress event like a command button for example. If a command button had the focus you could trap the F1 key like this: Private Sub Command1_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyF1 Then MsgBox "F1 Pressed" 'do whatever here End If End Sub We are already kind of out of the scope of this forum so I'll leave it at that.
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
| |||
|
hehheheh another question that i don't have to ask (c:= the answer is as suspected though. is this an easy task (the key interceptor)? they really make you jump through hoops to releive your VB app from the grips of the built in mappoint interface. |
| |||
| A bug or limitation of Mappoint?
I tried several ways including Window 32 API and subclass etc, but still failed. Who has a solution, please help me! Any suggestions are appreciated very much! |
| |||
|
set the keypreview to true for your form and use this code : Private Sub Mpc_GotFocus() Me.SetFocus End Sub Private Sub Mpc_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long) Me.SetFocus End Sub "Mpc" is the name of the Mappoint control in this case This work fine for me, all the keys are intercepted by the form except the four arrows keys, I dont know why only this keys could not be intercept but for all other key it's good. Bye |
| |||
| Thanks
Thank you very much, Coyote! The remaining issue is need to place the mouse pointer on the map before you press the key. |
| |||
| Re: Thanks Quote:
|
| |||
| Re: Thanks Quote:
|
![]() |
| Tags |
| avoid, control, focus, key, mapppoint, pressing |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mapppoint Technical Workshop in Paris | Mohamed | MapPoint 2006/2009 Discussion | 0 | 06-08-2006 04:25 AM |
| Delphi/Mappoint - Modal Form looses Focus & sent to back | PinnacleDev | MapPoint 2006/2009 Discussion | 2 | 12-06-2004 11:35 AM |
| How to programmatically draw a rectangular focus box? | Alex Chow | MapPoint 2006/2009 Discussion | 5 | 12-12-2003 05:53 AM |
| How to avoid basemaps? | Anonymous | MapPoint 2006/2009 Discussion | 2 | 04-02-2003 01:12 PM |
| MappPoint Data Updates | jonesm13 | MapPoint 2006/2009 Discussion | 1 | 09-30-2002 12:25 PM |