seava
路人甲
路人甲
  • 注册日期2004-03-11
  • 发帖数63
  • QQ
  • 铜币182枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1623回复:1

请教:用户定义类型未定义

楼主#
更多 发布于:2004-03-13 10:13
以下程序哪里错拉
Private Sub Command7_Click()
  Dim dc As New DataConnection
  Dim gs As GeoDataset
  Dim name As String
  Dim layer As MapObjects.MapLayer     ‘显示这句有问题。不解
  CommonDialog1.Filter = "ESRI Shapefiles (*.shp)|*.shp"
  CommonDialog1.ShowOpen
  If Len(CommonDialog1.FileName) = 0 Then Exit Sub
  dc.Database = CurDir
  If Not dc.Connect Then Exit Sub
  name = Left(CommonDialog1.FileTitle, Len(CommonDialog1.FileTitle) - 4)
  Set gs = dc.FindGeoDataset(name)
  If gs Is Nothing Then Exit Sub
  Set layer = New MapLayer
  layer.GeoDataset = gs
  Map1.Layers.Add layer
End Sub
喜欢0 评分0
seava
路人甲
路人甲
  • 注册日期2004-03-11
  • 发帖数63
  • QQ
  • 铜币182枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2004-03-13 11:26
已经解决。
举报 回复(0) 喜欢(0)     评分
游客

返回顶部