Community of VE/MapPoint Users and Developers
This is a discussion on Access some hidden features in MapPoint2002 ActiveX control within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, An example project under the link below shows a technique (using WinAPI) to access MapPoint2002 functionality (like 'Location Sensor' ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Access some hidden features in MapPoint2002 ActiveX control An example project under the link below shows a technique (using WinAPI) to access MapPoint2002 functionality (like 'Location Sensor' or 'Measure Distance' from 'Tools' menu), which is not readily available in the ActiveX control. Download: http://www3.sympatico.ca/spavlov/mappoint_extended.zip The code is not well documented and does not pretend to be bug-free. But, it is not too complex to understand. functionality, read the article here: http://www.mp2kmag.com/articles.asp?ArticleID=88 I appreciate responses, fixes as well as reports about new functionality been accessed and not present in the posted example. Thank you, Sergiy Pavlov |
| |||
|
Hi , just downloaded the extented .zip. Wonderful things happening here. You did that great! As I am new to VB and MapPoint I have some problems integrating your code into mine: First: With the MapPoint.cls I have name-conflict. I changed that module to mapoin and pasted the code into. First I want to include that location sensor. With objMap.DragBehavior = MapPointSupport.geoDragLocationSensor you call that function. And here's where I get an error saying no such objet existing (got a german version). Do have an idea what's the problem? Thanks a lot Peter |
| |||
|
Hi Sergiy, I still do have the name-conflict. I changed the classmodule mappoint to mappoin, did the Set objMap = New MapPoin had a problem with the moPan, commented it and... the location sensor is working now! Thanks a lot! Peter |
| |||
|
Hi, I tried to port your code into my application and want to use the "print" feature. However I got "Run time error 91 -- Object variable or with block object not set" with the following code line: Private Property Get hWnd_Frame() As Long Dim TWnd As New TWindow TWnd.hWnd = frmMain.hWnd TWnd.hWnd = TWnd.FindChildWindowByClass("ATL:", False).hWnd '******Problem occured here********** If Mid$(TWnd.ClassName, 9, 4) = "2748" Then TWnd.hWnd = TWnd.FindChildWindowByClass("ATL:", False).hWnd If Mid$(TWnd.ClassName, 9, 4) = "2070" Then TWnd.hWnd = TWnd.FindChildWindowByClass("AfxFrameOrView42").hW nd hWnd_Frame = TWnd.hWnd End If End If End Property I did set: Set obiMap = New MapPoint Set Map = frmMain.MappointControl.Activemap before I call objMap.SendCommand MapPointMenu.mnuFile.cmdPrint Do you have any clues? Any suggestions are appreciated very much! Thanks, |
| |||
|
David: What is Windows version your app runs on? And did the error happen in the original example application? I've recently found that on some Win98 systems TWindow.FindChildWindow method fails. It does not happen when a piece of code in TWindow.FindChildWindow is changed: If Not TWin.Valid Then Set TWin = Nothing End If To If TWin.hWnd = 0 Then Set TWin = Nothing End If Try it out! Sergiy |
| |||
|
Sergiy, thank you very much for your quick reply. No luck to get it work. My OS is Windows 2000. Your original example version works fine. The only differences is my main form (renamed as frmMain) is much more complicate than yours. By the way, can you bring up the "More options..." screen of the route planner by using the similar method. I'd like to bring up the screen just by clicking a button, but not on the route planner screen. Thanks again, David |
| |||
|
David, I would suggest that your MapPoint control was not placed directly on your frmMain but rather on some kind of a frame window. If the container frame name is 'Frame1', for instance, then inside 'Property Get hWnd_Frame' use that object name 'frmMain.Frame1' in place of 'frmMain'. If it is not your case, and there is indeed an unknown problem with frmMain complexity, then resolve it by creating such a frame (specifically designated to contain MapPoint control in it). Cut and paste MapPoint on the frame and point ''Property Get hWnd_Frame' to it as discussed above. Hope this should help, Sergiy |
| |||
|
Sergiy, thank you very much for your recognization of the problem. You are right, the Mappoint is not on the form directly. I will try it out following your instruction. Can you bring up the Window for routing preference by using a similar way? My application wants to set the parameters at the system configuration phase. David |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MS Access Mappoint ActiveX | Anonymous | MapPoint 2006/2009 Discussion | 2 | 05-21-2005 05:31 PM |
| Re: Keyboard control in mappoint activex control | djcapslock | MapPoint 2006/2009 Discussion | 1 | 03-10-2005 10:16 AM |
| MS Access and Mappoint ActiveX Control | Anonymous | MapPoint 2006/2009 Discussion | 3 | 06-26-2004 01:29 PM |
| Using MP ActiveX Control in Access/Foxpro etc | Anonymous | MapPoint 2006/2009 Discussion | 0 | 02-21-2003 11:51 AM |
| Hi EB Can i use the Map point control features .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 05-14-2002 02:03 AM |
Cheap flights to Italy
Italy is overflowing with things to do, things to see and things to eat. Why not book cheap flights to Italy online right now?
Cruise Travel Agent
Travel Counsellors is a leading Cruise Travel Agent. Visit the site to view details of your preferred Cruise Line.
Holidays to Thailand
The best cultures and backgrounds make Thailand an interesting and memorable country to visit. Book great value holidays to Thailand online at dealchecker.co.uk.
Barbados Holidays
Barbados holidays can be a wonderful break from the rat race or an exciting, action packed adventure. Plan the perfect holiday in Barbados.
Cheap Greece Holidays
For cheap Greece holidays make sure you know when to book and who to book with. Visit ulookubook.com to get help with doing both of those things. Why not time your visit with a Greek festival?
Travel Deals
Find the very best travel deals on your prime comparison site, Travel.co.uk
Holidays in Gran Canaria
Have some fun in the sun on the Canary Islands! See On The Beach for information on holidays in Gran Canaria.