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

📄 formnewtable.frm

📁 VB+mapinfo开发的最短路径
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form FormNewTable 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "新建图层"
   ClientHeight    =   5808
   ClientLeft      =   48
   ClientTop       =   336
   ClientWidth     =   6768
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   10.8
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5808
   ScaleWidth      =   6768
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Caption         =   "字段信息"
      Height          =   1812
      Left            =   120
      TabIndex        =   9
      Top             =   3000
      Width           =   4572
      Begin VB.TextBox Text3 
         Enabled         =   0   'False
         Height          =   372
         Left            =   3720
         TabIndex        =   18
         Text            =   "0"
         Top             =   1200
         Width           =   615
      End
      Begin VB.TextBox fieldwidth 
         Height          =   372
         Left            =   1080
         TabIndex        =   16
         Text            =   "10"
         Top             =   1200
         Width           =   1452
      End
      Begin VB.CheckBox Check1 
         Alignment       =   1  'Right Justify
         Caption         =   "索引"
         Height          =   255
         Left            =   3120
         TabIndex        =   14
         Top             =   720
         Width           =   1212
      End
      Begin VB.ComboBox combo1 
         Height          =   312
         ItemData        =   "FormNewTable.frx":0000
         Left            =   1080
         List            =   "FormNewTable.frx":0019
         Style           =   2  'Dropdown List
         TabIndex        =   13
         Top             =   720
         Width           =   1452
      End
      Begin VB.TextBox FieldName 
         Height          =   375
         Left            =   1080
         TabIndex        =   11
         Top             =   240
         Width           =   3252
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "小数位"
         Height          =   216
         Left            =   3000
         TabIndex        =   17
         Top             =   1320
         Width           =   648
      End
      Begin VB.Label Label4 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         Caption         =   "宽度"
         Height          =   216
         Left            =   120
         TabIndex        =   15
         Top             =   1320
         Width           =   912
      End
      Begin VB.Label Label3 
         Caption         =   "字段类型"
         Height          =   252
         Left            =   120
         TabIndex        =   12
         Top             =   720
         Width           =   972
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         Caption         =   "字段名"
         Height          =   216
         Left            =   120
         TabIndex        =   10
         Top             =   360
         Width           =   852
      End
   End
   Begin VB.CheckBox Check2 
      Caption         =   "表是否可地图化"
      Height          =   255
      Left            =   4800
      TabIndex        =   8
      Top             =   3840
      Width           =   1812
   End
   Begin MSFlexGridLib.MSFlexGrid Grid1 
      Height          =   2772
      Left            =   120
      TabIndex        =   7
      Top             =   240
      Width           =   4572
      _ExtentX        =   8065
      _ExtentY        =   4890
      _Version        =   393216
      Cols            =   3
      FixedCols       =   0
      BackColorBkg    =   16777215
      AllowBigSelection=   0   'False
      FocusRect       =   2
      HighLight       =   2
      ScrollBars      =   2
      SelectionMode   =   1
      FormatString    =   "^    字段名称   |^      类  型       |^索引"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.CommandButton delete 
      Caption         =   "删除字段"
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   4800
      TabIndex        =   6
      Top             =   1320
      Width           =   1812
   End
   Begin VB.CommandButton add 
      Caption         =   "增加字段"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   4800
      TabIndex        =   5
      Top             =   720
      Width           =   1812
   End
   Begin VB.CommandButton down 
      Caption         =   "下"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   5760
      TabIndex        =   4
      Top             =   120
      Width           =   852
   End
   Begin VB.CommandButton up 
      Caption         =   "上"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   4800
      TabIndex        =   3
      Top             =   120
      Width           =   852
   End
   Begin VB.CommandButton Command4 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4920
      TabIndex        =   2
      Top             =   5160
      Width           =   1215
   End
   Begin VB.CommandButton Command3 
      Caption         =   "创建"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Top             =   5160
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "投影..."
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.8
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4800
      TabIndex        =   0
      Top             =   3120
      Width           =   1812
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   2880
      Top             =   4920
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      CancelError     =   -1  'True
   End
End
Attribute VB_Name = "FormNewTable"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Row As Integer

Private Sub add_Click()
    If (Trim(FieldName.Text) = "") Then Exit Sub
    
    Grid1.Rows = Grid1.Rows + 1
    Row = Grid1.Rows - 1
    Grid1.RowSel = Row

  
    '字段名称
    FieldName.SetFocus
    FieldName.Text = "Field" + Format(Row, "##0")
    '字段类型

⌨️ 快捷键说明

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