免费视频|新人指南|投诉删帖|广告合作|地信网APP下载

查看: 2107|回复: 0
收起左侧

[求助] arcgis engine vb.net 开发

[复制链接]

3

主题

185

铜板

1

好友

助理工程师

Rank: 5Rank: 5

积分
226
发表于 2012-3-16 14:54 | 显示全部楼层 |阅读模式
20铜板
各路大侠,不才要做毕业设计,用arcgis engine  vb.net开发,抄了个代码如下:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim openFileDialogl As OpenFileDialog = New OpenFileDialog()
        openFileDialogl.Title = "打开Map地图"
        openFileDialogl.Filter = "Map Documents(*.shp)|*.shp"
        openFileDialogl.ShowDialog()
        Dim sFilePath As String
        sFilePath = openFileDialogl.FileName
        If sFilePath = "" Then Exit Sub
        On Error GoTo errorhandler_loadmxfile
        AxMapControl1.LoadMxFile(sFilePath)
        Exit Sub
errorhandler_loadmxfile:
        MsgBox(sFilePath & "不能导入!" + vbCrLf + "错误:" + Err.Description)
    End Sub
结果运行出错:在 System.Reflection.TargetInvocationException 中第一次偶然出现的“mscorlib.dll”类型的异常,有人说是版本问题,我的版本是4.0.30319.239

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

在线客服
快速回复 返回顶部 返回列表