⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 地理信息系统工程案例精选程序,本书所有案例均需要单独配置
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "AddGeoDataset及TableDesc示例"
   ClientHeight    =   2280
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   2280
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "建立NewShape图层(文件)"
      Height          =   975
      Left            =   1080
      TabIndex        =   0
      Top             =   600
      Width           =   2655
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'"建立NewShape图层(文件)"按钮鼠标单击相应事件
Private Sub Command1_Click()
  Dim TableX As New MapObjects2.TableDesc
  With TableX
    '添加两个字段
    .FieldCount = 2
    '设置字段名
    .FieldName(0) = "Name"
    .FieldName(1) = "Value"
    '设置字段类型
    .FieldType(0) = moString
    .FieldType(1) = moDouble
    '设置字段长度或精度
    .FieldLength(0) = 35
    .FieldPrecision(1) = 12
    .FieldScale(1) = 2
  End With
  
  Dim gdsNew As MapObjects2.GeoDataset
  '建立Shape文件
  Set gdsNew = dc.AddGeoDataset("NewShape", moShapeTypePoint, TableX)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -