Community of VE/MapPoint Users and Developers
This is a discussion on How do I get Focus on the Map without a click? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; My problem is to get focus on the map so I can use the rolling mouse directly - that is ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Thanks in advance |
| |||
| Re: How do I get Focus on the Map without a click?
Hi, No I tryed also Focus() and Select() but this seems not to work. Maybe a solution is to send a mouse click to the control ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Quote:
Call PostMessage(Form1.hwnd, &H201, 0, &H6400C Call PostMessage(Me.Text3.hwnd, &H201, 0, 0) ' Postnumber. It works - focus there (mouseclick give you focus). Regards Katarina |
| |||
| Re: How do I get Focus on the Map without a click?
Hi Katarina, Form1.hwnd is the form's windows handle. Maybe try the MapPoint component's windows handle ? eg if you have named it MP then try MP.Handle
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Quote:
I have tried it before - I cannot find any Handle !? By a lucky chance I found that objPin.Select will work that is the map is in focus. But just once! If you try the code again it will not work. Any ideas? Regards /Katarina Here is my code for a button Private Sub Command1_Click() sK = "Sweden" Set objFindOlikaKartor = objMap.FindPlaceResults(sK) Set oLoc = objFindOlikaKartor.Item(1) ' oLoc.GoTo Set objPinPlats = objMap.AddPushpin(oLoc) objPinPlats.Symbol = 28 objPinPlats.Highlight = False objPinPlats.Name = sK objPinPlats.BalloonState = geoDisplayBalloon objPinPlats.Select ' sK = "Germany" Set objFindOlikaKartor = objMap.FindPlaceResults(sK) Set oLoc = objFindOlikaKartor.Item(1) ' oLoc.GoTo Set objPinPlats = objMap.AddPushpin(oLoc) objPinPlats.Symbol = 28 objPinPlats.Highlight = False objPinPlats.Name = sK objPinPlats.BalloonState = geoDisplayBalloon objPinPlats.Select ' first time Focus on the map ("Germany") second time no Focus. Exit Sub End Sub |
| |||
| Re: How do I get Focus on the Map without a click?
Hi Katarina, I think you use the object model. Dont know if you have a Handle property. You have one when you use the activeX component.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| click, focus, map |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Delphi/Mappoint - Modal Form looses Focus & sent to back | PinnacleDev | MapPoint 2006/2009 Discussion | 2 | 12-06-2004 11:35 AM |
| Long/Lat from click. | Milo | MapPoint 2006/2009 Discussion | 7 | 10-29-2004 08:32 AM |
| How to add click event for VB.Net ? | Anonymous | MapPoint 2006/2009 Discussion | 2 | 12-31-2003 01:15 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 mapppoint control focus when pressing a Key | Anonymous | MapPoint 2006/2009 Discussion | 8 | 01-13-2003 07:45 PM |