Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

Extending the MapPoint ActiveX Control - Pt. II

This is a discussion on Extending the MapPoint ActiveX Control - Pt. II within the MP2K Magazine Articles forums, part of the Map Forums category; Sergiy Pavlov continues to show how to add functionality to the MapPoint ActiveX control Read the full article at: Extending ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Extending the MapPoint ActiveX Control - Pt. II

    Sergiy Pavlov continues to show how to add functionality to the MapPoint ActiveX control

    Read the full article at: Extending the MapPoint ActiveX Control - Pt. II - MapPoint Articles - MP2K Magazine
    Last edited by Paul Larson; 11-12-2007 at 07:49 AM. Reason: URL updated after article ID reassignments

  2. #2
    baal_2000's Avatar
    baal_2000 is offline Junior Member Yellow Belt
    Join Date
    Jan 2003
    Location
    Toronto, ON, Canada
    Posts
    24

  3. #3
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Extending the MapPoint ActiveX Control - Pt. II

    I was taking a look at the code for this and wondering if there is a way to trigger or simulate clicking the Freeform button on the drawing toolbar?




    Code:
     
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' (R) 2003 Sergiy Pavlov -- Do not remove this header
    '     baal_2000  AT  yahoo   DOT   com
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    '  This source code is provided "as is" and  can only  be used in accordance
    '  with the terms and conditions of the Microsoft MapPoint 2002 and Microsoft
    '  Visual Basic End User License Agreements.
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Option Explicit
    Private objMap As clsMapPoint
    Private Sub mnuAddAsEnd_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdAddAsEnd)
    End Sub
    Private Sub mnuAddAsStart_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdAddAsStart)
    End Sub
    Private Sub mnuAddAsStop_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdAddAsStop)
    End Sub
    Private Sub mnuAlwaysShowPosition_Click()
        Call objMap.SendCommand(MapPointMenu.mnuTools.cmdGPSAlwaysShowPosition)
    End Sub
    Private Sub mnuAvoidArea_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdAvoidArea)
    End Sub
    Private Sub mnuClearRoute_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdClearRoute)
    End Sub
    Private Sub mnuConstructionInfoUpdate_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdRoadConstructionNfoUpd)
    End Sub
    Private Sub mnuCopy_Click()
            Call objMap.SendCommand(MapPointMenu.mnuEdit.cmdCopy)
    End Sub
    Private Sub mnuCopyDirections_Click()
            Call objMap.SendCommand(MapPointMenu.mnuEdit.cmdCopyDirections)
    End Sub
    Private Sub mnuCopyMap_Click()
            Call objMap.SendCommand(MapPointMenu.mnuEdit.cmdCopyMap)
    End Sub
    Private Sub mnuCopyShortcut_Click()
        Call objMap.SendCommand(MapPointMenu.mnuEdit.cmdCopyShortcut)
    End Sub
    Private Sub mnuDataMappingWizard_Click()
            Call objMap.SendCommand(MapPointMenu.mnuData.cmdDataMappingWizard)
    End Sub
    Private Sub mnuDirections_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdDirections)
    End Sub
    Private Sub mnuDrawing_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdTBDrawing)
    End Sub
    Private Sub mnuExit_Click()
        Unload Me
    End Sub
    Private Sub mnuExportToExcel_Click()
            Call objMap.SendCommand(MapPointMenu.mnuData.cmdExportToExcel)
    End Sub
    Private Sub mnuFind_Click()
        Call objMap.SendCommand(MapPointMenu.mnuEdit.cmdFind)
    End Sub
    Private Sub mnuFindNearbyPlaces_Click()
        Call objMap.SendCommand(MapPointMenu.mnuTools.cmdFindNearbyPlaces)
    End Sub
    Private Sub mnuFontLarge_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdFont_Large)
    End Sub
    Private Sub mnuFontLargest_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdFont_Largest)
    End Sub
    Private Sub mnuFontMedium_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdFont_Medium)
    End Sub
    Private Sub mnuFontSmall_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdFont_Small)
    End Sub
    Private Sub mnuFontSmallest_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdFont_Smallest)
    End Sub
    Private Sub mnuGetDirections_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdGetDirections)
    End Sub
    Private Sub mnuGPSReceiverSettings_Click()
            Call objMap.SendCommand(MapPointMenu.mnuTools.cmdGPSReceiverSettings)
    End Sub
    Private Sub mnuGPSSensor_Click()
            Call objMap.SendCommand(MapPointMenu.mnuTools.cmdGPSSensor)
    End Sub
    Private Sub mnuGPSTrackPosition_Click()
            Call objMap.SendCommand(MapPointMenu.mnuTools.cmdGPSTrackPosition)
    End Sub
    Private Sub mnuImportDataWizard_Click()
            Call objMap.SendCommand(MapPointMenu.mnuData.cmdImportDataWizard)
    End Sub
    Private Sub mnuLegendAndOverview_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdLegendAndOverview)
    End Sub
    Private Sub mnuLinkDataWizard_Click()
            Call objMap.SendCommand(MapPointMenu.mnuData.cmdLinkDataWizard)
    End Sub
    Private Sub mnuLocationAndScale_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdTBLocationAndScale)
    End Sub
    Private Sub mnuLocationSensor_Click()
        objMap.LocationSensorVisible = Not objMap.LocationSensorVisible
    End Sub
    Private Sub mnuMapPointHelp_Click()
        Call objMap.SendCommand(MapPointMenu.mnuHelp.cmdMapPointHelp)
    End Sub
    Private Sub mnuMapPolitical_Click()
        Call objMap.SendCommand(MapPointMenu.mnuView.cmdMapStyle_Political)
    End Sub
    Private Sub mnuMapStyleRoads_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdMapStyle_Roads)
    End Sub
    Private Sub mnuMapStyleRoadsAndData_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdMapStyle_RoadsAndData)
    End Sub
    Private Sub mnuMapStyleTerrain_Click()
        Call objMap.SendCommand(MapPointMenu.mnuView.cmdMapStyle_Terrain)
    End Sub
    Private Sub mnuMeasureDist_Click()
            Call objMap.SendCommand(MapPointMenu.mnuTools.cmdMeasureDistance)
    End Sub
    Private Sub mnuNavigateBack_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdBack)
    End Sub
    Private Sub mnuNavigateForward_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdForward)
    End Sub
    Private Sub mnuNavigation_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdTBNavigation)
    End Sub
    Private Sub mnuOptimizeStops_Click()
        Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdOptimizeStops)
    End Sub
    Private Sub mnuOptions_Click()
        Call objMap.SendCommand(MapPointMenu.mnuTools.cmdOptions)
    End Sub
    Private Sub mnuPageSetup_Click()
            Call objMap.SendCommand(MapPointMenu.mnuFile.cmdPageSetup)
    End Sub
    Private Sub mnuPaste_Click()
        Call objMap.SendCommand(MapPointMenu.mnuEdit.cmdPaste)
    End Sub
    Private Sub mnuPrint_Click()
            Call objMap.SendCommand(MapPointMenu.mnuFile.cmdPrint)
    End Sub
    Private Sub mnuRedo_Click()
            Call objMap.SendCommand(MapPointMenu.mnuEdit.cmdRedo)
    End Sub
    Private Sub mnuRouteOptions_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdRouteOptions)
    End Sub
    Private Sub mnuExport_Click()
            Call objMap.SendCommand(MapPointMenu.mnuFile.cmdExportToPocketStreets)
    End Sub
    Private Sub mnuRoutePlanner_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdRoutePlanner)
    End Sub
    Private Sub mnuSaveAs_Click()
            Call objMap.SendCommand(MapPointMenu.mnuFile.cmdSaveAs)
    End Sub
    Private Sub mnuSaveAsWebPage_Click()
            Call objMap.SendCommand(MapPointMenu.mnuFile.cmdSaveAsWebPage)
    End Sub
    Private Sub mnuManageSavedWebPages_Click()
            Call objMap.SendCommand(MapPointMenu.mnuFile.cmdManageSavedWebPages)
    End Sub
    Private Sub mnuScheduleStop_Click()
            Call objMap.SendCommand(MapPointMenu.mnuRoute.cmdScheduleStop)
    End Sub
    Private Sub mnuSendMapFeedback_Click()
            Call objMap.SendCommand(MapPointMenu.mnuTools.cmdSendMapFeedback)
    End Sub
    Private Sub mnuShowOrHidePlaces_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdShowOrHidePlaces)
    End Sub
    Private Sub mnuStandard_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdTBStandard)
    End Sub
    Private Sub mnuTerritories_Click()
            Call objMap.SendCommand(MapPointMenu.mnuData.cmdTerritories)
    End Sub
    Private Sub mnuTestSaveAsWebPage_Click()
        Dim TWnd As New TWindow
     
        TWnd.hWnd = objMap.hWnd_EXE 'got the target!
     
        'toggle SaveAsWebPage dialog!
        Call TWnd.PostMessageLong(WM_COMMAND, 35032)
    End Sub
    Private Sub mnuUndo_Click()
            Call objMap.SendCommand(MapPointMenu.mnuEdit.cmdUndo)
    End Sub
    Private Sub mnuZoomIn_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdZoom_In)
    End Sub
    Private Sub mnuZoomOut_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdZoom_Out)
    End Sub
    Private Sub mnuZoomTo48States_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdZoom_To48States)
    End Sub
    Private Sub mnuZoomToData_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdZoom_ToData)
    End Sub
    Private Sub mnuZoomToEntireRoute_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdZoom_ToEntireRoute)
    End Sub
    Private Sub mnuZoomToNorthAmerica_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdZoom_ToNorthAm)
    End Sub
    Private Sub mnuZoomToSelection_Click()
            Call objMap.SendCommand(MapPointMenu.mnuView.cmdZoom_ToSelection)
    End Sub
    Private Sub RoadsAndDatamnuMapStyleData_Click()
        Call objMap.SendCommand(MapPointMenu.mnuView.cmdMapStyle_Data)
    End Sub
    Private Sub CheckLocationSensorTimer1_Timer()
        'Check for LocationSensor here
        On Error Resume Next
        Dim bIsChecked As BorderStyleConstants
        bIsChecked = objMap.LocationSensorVisible
        If mnuLocationSensor.Checked <> bIsChecked Then
            mnuLocationSensor.Checked = bIsChecked
        End If
    End Sub
    Private Sub Form_Load()
            Set objMap = New clsMapPoint
    End Sub
    Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
            Set objMap = Nothing
    End Sub

  4. #4
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Extending the MapPoint ActiveX Control - Pt. II

    It looks like Paul Larson just answered this in April !

    select contents of shape

    Thanks Paul.

    Eric

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Re: Keyboard control in mappoint activex control
    By djcapslock in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-10-2005, 11:16 AM
  2. Extending the MapPoint ActiveX Control - Pt. I
    By Anonymous in forum MP2K Magazine Articles
    Replies: 1
    Last Post: 05-16-2003, 11:59 AM
  3. Extending the MapPoint ActiveX Control Question
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-16-2003, 11:56 AM
  4. I am using the MapPoint ActiveX control in a VB Ap....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-24-2001, 07:35 AM
  5. How does one get the activeX mappoint control to d....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-25-2001, 07:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 55 56 57 58 59 60 61 62 63 64 65 66