Community of VE/MapPoint Users and Developers
This is a discussion on An API to Control MapPoint 2006 GPS Features - Part I of II within the MP2K Magazine Articles forums, part of the Map Forums category; Paul Larson shares an API he developed to add programmatic GPS functionality to MapPoint code projects and includes a demo ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| An API to Control MapPoint 2006 GPS Features - Part I of II "With the release of MapPoint 2006 North America (MP2K6NA) earlier this year, many users have been elated with the new map content and the addition of GPS features and Driving Guidance to the product. Likewise, many developers have thus found issue with the lack of improvement to the MapPoint API, specifically in relation to these new features. Being of the latter group, I decided to roll-my-own API to add programmatic GPS functionality to my MapPoint code projects." Read the full article -- An API to Control MapPoint 2006 GPS Features - Part I of II - MapPoint Articles - MP2K Magazine Discuss the article in this thread below by clicking on Post Reply or use the Quick Reply button on the right.
__________________ Order MapPoint 2006 | Read Programming MapPoint in .NET | Start Using the Pushpin Tool - Free Trial Download - click here. Last edited by Eric Frost; 08-31-2006 at 10:23 AM. |
| |||
|
I've finally obtained a copy of MapPoint 2006 EUROPE, and noted a slight change needed in the code to handle a difference in this version. For some reason, Microsoft embedded a CrLf combo in the text of the button to toggle voice prompting. So, in the module mpGPS.vb, in the New() procedure, add the following code: 'EDIT: In mappoint2006 EUROPE, there is a CrLf in the button caption for voice control: If hwToggleVoice = 0 Then hwToggleVoice = FindWindowEx(hwChild(3), 0, vbNullString, "Turn Voice" & ControlChars.CrLf & "Off (F7)") ...immediately before the line which reads: hwRepeatLastInstruction = FindWindowEx(hwChild(3), 0, vbNullString, "Repeat Instruction (Spacebar)") Also, you will of course need to update the sample project (mpGPSDemo) reference for Interop.MapPoint to the correct version when using it with the European desktop product. Best Regards, Paul Larson |
| ||||
|
Cool thanks, Eric
__________________ Order MapPoint 2006 | Read Programming MapPoint in .NET | Start Using the Pushpin Tool - Free Trial Download - click here. |
| |||
| Re: An API to Control MapPoint 2006 GPS Features - Part I of II
Great article, have recompiled for Mappoint Europe and it works fine. Anyone any clues how to extend this to hook the modal warning window pop up when navigation is selected and OK it automatically. Its a really annoying feature of mappoint!. Cheers Pete |
| |||
| Re: An API to Control MapPoint 2006 GPS Features - Part I of II
Hi Enigma I'm not envisioning distributing the code to dismiss this warning as a part of the API, simply for liability reasons. However, if you contact me directly, I'd be happy to provide a code snippet. Best Regards, Paul |
| |||
| Re: An API to Control MapPoint 2006 GPS Features - Part I of II
Greetings! Since I've had numerous requests for the code to automatically dismiss the "Safety Warning" dialog when calling my ToggleGuidance() method, I'm posting the code here for public use. Simply replace the entire routine for ToggleGuidance() with the entire code below. (In module mpGPS.vb) Note: By using this code you assume full responsibility and risk, and agree not to hold Paul Larson nor Paul Larson, LLC liable for damages. '---BEGIN CODE--- Public Sub ToggleGuidance() If lGPS_UseDrivingGuidance = False Then Dim myDismisser As New DismissSafetyWarning SendMessage(hwProvideDrivingGuidance, BM_CLICK, 0, 0) lGPS_UseDrivingGuidance = Not lGPS_UseDrivingGuidance End Sub Private Class DismissSafetyWarning Private IsDismissed As Boolean = False Public Sub New() Dim myThread As System.Threading.Thread myThread = New System.Threading.Thread(AddressOf DismissWarningThread) myThread.Start() End Sub Private Sub DismissWarningThread() Dim Retries As Integer Dim hwWarning As Integer Dim hwAgree As Integer For Retries = 1 To 10 'wait 1/8 of a second System.Threading.Thread.Sleep(125) hwWarning = FindWindowEx(GetDesktopWindow, 0, vbNullString, "Safety Warning") If hwWarning <> 0 Then hwAgree = FindWindowEx(hwWarning, 0, "Button", "I &Agree") If hwAgree <> 0 Then SendMessage(hwAgree, BM_CLICK, 0, 0) IsDismissed = True End If End If Next End Sub End Class '---END CODE--- Best Regards, Paul Larson |
![]() |
| ||||
| Posted By | For | Type | Date | |
| An API to Control MapPoint 2006 GPS Features - Part I of II - MapPoint Articles - MP2K Magazine | This thread | Refback | 09-13-2006 08:36 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MapPoint Automation with C/C++ - Part 1 | Eric Frost | MP2K Magazine Articles | 10 | 09-15-2006 10:01 AM |
| Access some hidden features in MapPoint2002 ActiveX control | baal_2000 | MapPoint 2006/2009 Discussion | 43 | 08-29-2006 10:46 AM |
| Using Python to Control MapPoint, Part 2 | Eric Frost | MP2K Magazine Articles | 0 | 07-11-2006 07:41 PM |
| Using Python to control MapPoint, Part 1 | Eric Frost | MP2K Magazine Articles | 0 | 03-26-2006 10:29 PM |
| 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 Benidorm
Book cheap flights to Benidorm with Holiday Hypermarket. Whether Summer or Winter Benidorm is a great destination.
Spain Holidays
Find and book Spain Holidays with Travel Counsellors. Holiday destinations around the world including Spain.
Turkey Holidays
Istanbul is Turkey's prime attraction as it has the most beautiful mosques and palaces of the country; it has Byzantine churches and Roman temples. Book Turkey Holidays online.
Dubai Holidays
Dubai holidays provide you with exotic sights, desert safaris and superb cuisine. There is an extensive range of things to do and see!
Cheap Portugal Holidays
Want to know what the best time to book cheap Portugal holidays is? Well have a look on ulookubook.com for some useful information to save your cash. Golf, tennis and cycling are all very popular here.
Travel
Check out the travel options on Travel.co.uk.
Cheap Goa Holidays
Experience the world famous Wednesday Flea Market at Anjuna! Book cheap Goa holidays at On The Beach!