2,156
社区成员
发帖
与我相关
我的任务
分享
我用VS2010 VB开发估计和VS2008差不多,在工程目录下的 My Project\Application.Designer.vb 文件中修改。在默认定义的类 Partial Friend Class MyApplication 内添加:
Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
If Not ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine) Then
If Not ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop) Then
MessageBox.Show("Unable to bind to ArcGIS runtime.Application will be shut down.")
e.Cancel = True 'Abort application start up
End If
End If
End Sub
即可