New event
Occurs when a new map is created.
Applies to
Objects: Application
Syntax
object.New
Parameters
Part | Description |
---|---|
object | An expression that evaluates to an Application object. |
Remarks
To get the map that was just created, use the ActiveMap property.
Do not make this event infinitely recursive by calling itself or causing itself to be called.
Example
Dim WithEvents objApp As MapPoint.Application
Private Sub Form_Load()
'Set up the application
Set objApp = CreateObject("mappoint.application")
objApp.Visible = True
objApp.UserControl = True
End Sub
Private Sub Command1_Click()
'Refresh the map using NewMap when button is clicked
objApp.NewMap
End Sub
Private Sub objApp_New()
MsgBox "New event fired."
End Sub