MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How do I get Focus on the Map without a click?

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-02-2006
Junior Member
White Belt
 
Join Date: Nov 2006
Posts: 3
Smile How do I get Focus on the Map without a click?

My problem is to get focus on the map so I can use the rolling mouse directly - that is without first making a click on the map. I have tried 'MyMap.SetFocus' - it seems that you have the focus on the map but you must first click on the map. Does anyone have something to suggest?
Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 11-03-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 11-11-2006
Junior Member
White Belt
 
Join Date: Nov 2006
Posts: 3
Question Re: How do I get Focus on the Map without a click?

Quote:
Originally Posted by Wilfried View Post
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 ?
Hi - It Did not work what I can see. Have you any further suggestions?
Call PostMessage(Form1.hwnd, &H201, 0, &H6400C ' MyMap i Can't user.hwnd. I use the Form instead. Does not work.
Call PostMessage(Me.Text3.hwnd, &H201, 0, 0) ' Postnumber. It works - focus there (mouseclick give you focus).
Regards Katarina
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 11-11-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 11-13-2006
Junior Member
White Belt
 
Join Date: Nov 2006
Posts: 3
Cool Re: How do I get Focus on the Map without a click?

Quote:
Originally Posted by Wilfried View Post
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
Hi !
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 11-13-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
click, focus, map


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 03:41 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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