Button.vb
' Copyright 2011 ESRI ' ' All rights reserved under the copyright laws of the United States ' and applicable international laws, treaties, and conventions. ' ' You may freely redistribute and use this sample code, with or ' without modification, provided you include the original copyright ' notice and use restrictions. ' ' See the use restrictions. ' Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Linq Imports System.Text Imports ESRI.ArcGISExplorer Imports ESRI.ArcGISExplorer.Application Imports ESRI.ArcGISExplorer.Geometry Imports ESRI.ArcGISExplorer.Mapping Imports ESRI.ArcGISExplorer.Data Imports ESRI.ArcGISExplorer.Threading Public Class Button Inherits ESRI.ArcGISExplorer.Application.Button Public Overrides Sub OnClick() 'Access the ActiveMapDisplay of the Application Dim md As MapDisplay = Application.ActiveMapDisplay 'Click on the map to create a new Point Dim trackedPoint As ESRI.ArcGISExplorer.Geometry.Point = md.TrackPoint() 'Turn the Point in to a Graphic Dim pointGraphic As Graphic = New Graphic(trackedPoint) 'Set the Graphic's symbol to a Red Pushpin pointGraphic.Symbol = Symbol.Marker.Pushpin.Red 'Add the point Graphic to the map md.Graphics.Add(pointGraphic) End Sub End Class