cmdNAProperties.vb
' Copyright 2012 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 Microsoft.VisualBasic Imports System.Runtime.InteropServices Imports System.Windows.Forms ' This command brings up the property pages for the ArcGIS Network Analyst extension environment. Namespace NAEngine <Guid("7E98FE97-DA7A-4069-BC85-091D75B1AF65"), ClassInterface(ClassInterfaceType.None), ProgId("NAEngine.NAProperties")> _ Public NotInheritable Class cmdNAProperties : Inherits ESRI.ArcGIS.ADF.BaseClasses.BaseCommand Public Sub New() MyBase.m_caption = "Properties..." End Sub Public Overrides Sub OnClick() ' Show the Property Page form for ArcGIS Network Analyst extension Dim props As frmNAProperties = New frmNAProperties() props.ShowModal() End Sub Public Overrides Sub OnCreate(ByVal hook As Object) ' Since this ToolbarMenu item is on the ToolbarControl the Hook is initialized by the ToolbarControl. Dim toolbarControl As ESRI.ArcGIS.Controls.IToolbarControl = TryCast(hook, ESRI.ArcGIS.Controls.IToolbarControl) End Sub End Class End Namespace