Share via


DataMapChange event

Occurs after data mapping properties are changed for a data set.

Applies to

Objects: Map, MappointControl

Syntax

object.DataMapChange(ChangedDataSet)

Parameters

Part

Description

object

An expression that evaluates to a Map or MappointControl object.

ChangedDataSet

DataSet object. Data set for which properties were changed.

Remarks

  • Do not make this event infinitely recursive by calling itself or causing itself to be called.

Example

  'This sample code requires a button and a listbox on the form
  Dim WithEvents objApp As MapPoint.Application
  Dim WithEvents objMap As MapPoint.Map

  Private Sub Form_Load()
    'Set up the application
    Set objApp = CreateObject("mappoint.application")
    Set objMap = objApp.ActiveMap
    objApp.Visible = True
    objApp.UserControl = True
  End Sub

  Private Sub Command1_Click()
    'Put a data set on the map, then change its properties
    objMap.DataSets.AddPushpinSet "Pushpin Set"
    objMap.DataSets.Item(1).FieldNamesVisibleInBalloon = True
  End Sub

  Private Sub objMap_DataMapChange(ByVal ChangedDataSet As MapPoint.DataSet)
    List1.AddItem "DataMapChange event fired"
  End Sub