''' <summary>
''' This sub bings the ArcGIS runtime object to the application at runtime.
''' </summary>
''' <param name="sender">the sender object</param>
''' <param name="e">the event argument</param>
''' <remarks></remarks>
Private Sub BindingArcGISRuntime(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ResolveBindingEvent
'
' TODO: Modify ArcGIS runtime binding code as needed
'
If Not RuntimeManager.Bind(ProductCode.Desktop) Then
' Failed to bind, announce and force exit
MsgBox("ArcGIS runtime binding failed. Application will shut down.")
End
End If
End Sub
Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
Debug.Write("Initializing ESRI license...")
'ESRI License Initializer generated code.
m_AOLicenseInitializer.InitializeApplication(New esriLicenseProductCode() {esriLicenseProductCode.esriLicenseProductCodeStandard}, _
New esriLicenseExtensionCode() {})
Debug.WriteLine("Done.")
Debug.Write("Initializing ArcObjects license...")
GISValidationTool.initializeArcObjects()
Debug.WriteLine("Done.")
End Sub
if (!RuntimeManager.Bind(ProductCode.Engine))
{
if (!RuntimeManager.Bind(ProductCode.Desktop))
{
MessageBox.Show("Unable to bind to ArcGIS runtime. Application will be shut down.");
return;
}
}
if (!aoLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeEngine, esriLicenseProductCode.esriLicenseProductCodeBasic, esriLicenseProductCode.esriLicenseProductCodeStandard },
new esriLicenseExtensionCode[] { }))