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

📄 frmmain.frm

📁 都是基于VB所做的程序集合,值得大家作为实践的参考资料.
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{03ED3B1E-ED1B-4A2E-8FE3-D8D1A673F5D4}#5.2#0"; "SuperMap.ocx"
Begin VB.Form frmMain 
   Caption         =   "栅格配准"
   ClientHeight    =   6840
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9690
   Icon            =   "FrmMain.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6840
   ScaleWidth      =   9690
   StartUpPosition =   2  'CenterScreen
   Begin SuperMapLib.SuperMap SuperMap1 
      Height          =   3060
      Left            =   75
      TabIndex        =   30
      Top             =   465
      Width           =   6600
      _Version        =   327682
      _ExtentX        =   11642
      _ExtentY        =   5397
      _StockProps     =   160
      BorderStyle     =   1
   End
   Begin SuperMapLib.SuperMap SuperMap2 
      Height          =   3060
      Left            =   75
      TabIndex        =   31
      Top             =   3660
      Width           =   6600
      _Version        =   327682
      _ExtentX        =   11642
      _ExtentY        =   5397
      _StockProps     =   160
      BorderStyle     =   1
   End
   Begin SuperMapLib.SuperWorkspace SuperWorkspace1 
      Left            =   4605
      Top             =   3180
      _Version        =   327682
      _ExtentX        =   847
      _ExtentY        =   847
      _StockProps     =   0
   End
   Begin VB.ComboBox CmbType 
      Height          =   315
      ItemData        =   "FrmMain.frx":058A
      Left            =   4530
      List            =   "FrmMain.frx":0597
      Style           =   2  'Dropdown List
      TabIndex        =   29
      Top             =   30
      Width           =   1890
   End
   Begin VB.CommandButton CmdReRe 
      Caption         =   "重新配准"
      Height          =   375
      Left            =   7575
      TabIndex        =   28
      Top             =   0
      Width           =   915
   End
   Begin VB.TextBox TxtSourceY 
      Height          =   315
      Left            =   8550
      TabIndex        =   19
      Text            =   "0.000000"
      Top             =   6000
      Width           =   1140
   End
   Begin VB.TextBox TxtSourceX 
      Height          =   315
      Left            =   7050
      TabIndex        =   18
      Text            =   "0.000000"
      Top             =   6000
      Width           =   1140
   End
   Begin VB.TextBox TxtTargetY 
      Height          =   315
      Left            =   8550
      TabIndex        =   15
      Text            =   "0.000000"
      Top             =   2625
      Width           =   1140
   End
   Begin VB.TextBox TxtTargetX 
      Height          =   315
      Left            =   7050
      TabIndex        =   14
      Text            =   "0.000000"
      Top             =   2625
      Width           =   1140
   End
   Begin VB.Frame Frame2 
      Height          =   540
      Left            =   6750
      TabIndex        =   9
      Top             =   6300
      Width           =   2940
      Begin VB.CommandButton CmdRSamSource 
         Caption         =   "重采样"
         Height          =   315
         Left            =   2175
         TabIndex        =   25
         Top             =   150
         Width           =   690
      End
      Begin VB.CommandButton Command3 
         Caption         =   "清除"
         Height          =   315
         Left            =   1650
         TabIndex        =   27
         Top             =   150
         Width           =   540
      End
      Begin VB.CommandButton CmdDelSource 
         Caption         =   "删除"
         Height          =   315
         Left            =   1125
         TabIndex        =   23
         Top             =   150
         Width           =   540
      End
      Begin VB.CommandButton CmdEditSource 
         Caption         =   "编辑"
         Height          =   315
         Left            =   600
         TabIndex        =   24
         Top             =   150
         Width           =   540
      End
      Begin VB.CommandButton CmdNewSource 
         Caption         =   "新建"
         Height          =   315
         Left            =   75
         TabIndex        =   22
         Top             =   150
         Width           =   540
      End
   End
   Begin MSComctlLib.ListView LsvTarget 
      Height          =   2190
      Left            =   6750
      TabIndex        =   5
      Top             =   375
      Width           =   2940
      _ExtentX        =   5186
      _ExtentY        =   3863
      View            =   3
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   0
      NumItems        =   0
   End
   Begin VB.Frame Frame1 
      Height          =   540
      Left            =   6750
      TabIndex        =   8
      Top             =   3000
      Width           =   2940
      Begin VB.CommandButton CmdRSamTarget 
         Caption         =   "重采样"
         Height          =   315
         Left            =   2175
         TabIndex        =   13
         Top             =   150
         Width           =   690
      End
      Begin VB.CommandButton Command2 
         Caption         =   "清除"
         Height          =   315
         Left            =   1650
         TabIndex        =   26
         Top             =   150
         Width           =   540
      End
      Begin VB.CommandButton CmdDelTarget 
         Caption         =   "删除"
         Height          =   315
         Left            =   1125
         TabIndex        =   11
         Top             =   150
         Width           =   540
      End
      Begin VB.CommandButton CmdEditTarget 
         Caption         =   "编辑"
         Height          =   315
         Left            =   600
         TabIndex        =   12
         Top             =   150
         Width           =   540
      End
      Begin VB.CommandButton CmdNewTarget 
         Caption         =   "新建"
         Height          =   315
         Left            =   75
         TabIndex        =   10
         Top             =   150
         Width           =   540
      End
   End
   Begin VB.CommandButton CmdRegister 
      Caption         =   "配准"
      Height          =   375
      Left            =   6660
      TabIndex        =   7
      Top             =   0
      Width           =   915
   End
   Begin VB.CommandButton Command1 
      Caption         =   "刷新"
      Height          =   375
      Index           =   7
      Left            =   2910
      TabIndex        =   4
      Top             =   0
      Width           =   945
   End
   Begin VB.CommandButton Command1 
      Caption         =   "漫游"
      Height          =   375
      Index           =   1
      Left            =   75
      TabIndex        =   3
      Top             =   0
      Width           =   945
   End
   Begin VB.CommandButton Command1 
      Caption         =   "自由缩放"
      Height          =   375
      Index           =   4
      Left            =   1020
      TabIndex        =   2
      Top             =   0
      Width           =   945
   End
   Begin VB.CommandButton Command1 
      Caption         =   "全幅显示"
      Height          =   375
      Index           =   5
      Left            =   1965
      TabIndex        =   1
      Top             =   0
      Width           =   945
   End
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   375
      Index           =   6
      Left            =   8640
      TabIndex        =   0
      Top             =   0
      Width           =   1020
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   5970
      Top             =   4785
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin MSComctlLib.ListView LsvSource 
      Height          =   2340
      Left            =   6750
      TabIndex        =   6
      Top             =   3600
      Width           =   2940
      _ExtentX        =   5186
      _ExtentY        =   4128
      View            =   3
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   0
      NumItems        =   0
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Y:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   1
      Left            =   8325
      TabIndex        =   21
      Top             =   6000
      Width           =   225
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "X:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   1
      Left            =   6825
      TabIndex        =   20
      Top             =   6000
      Width           =   210
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Y:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   0
      Left            =   8250
      TabIndex        =   17
      Top             =   2625
      Width           =   225
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "X:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   0
      Left            =   6825
      TabIndex        =   16
      Top             =   2625
      Width           =   135
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

'=====================================SuperMap Objects示范工程说明=======================================
'
'功能简介:示范SuperMap Objects的栅格数据集配准功能及多种配准方式
'所用控件:SuperMap控件、SuperWorkspace控件
'所用数据:Data\Register目录RegisterTest.sdb和RegisterTest.sdd两个文件
'操作说明:
'       1、单击"自由缩放"、"漫游"、"全幅显示"、"刷新"等进行相应的基本操作;
'       2、单击配准方式下拉框,选择相应的配准方式,确定配准方式;
'       3、单击"新建",然后在地图窗口按下鼠标,根据配准方式所要求的点的数目按相应的次数,在地图窗口
'          上显示相应的点的个数(当配准方式为"矩形配准"时,可以不要在栅格地图上取点);
'       4、在点坐标列表框中选中一对坐标,单击"删除"删除该点;
'       5、单击"清除"删除全部坐标点;
'       6、在点坐标列表框中选中一对坐标,然后单击"重采样",在地图窗口中按下鼠标移动当前选中的点;
'       7、当坐标点数目达到配准方式要求的数目时,单击"配准"按钮进行栅格数据集的配准;
'       8、单击"重新配准",进行下一次的配准试验。
'
'===================================SuperMap Objects 示范工程说明结束=====================================

Option Explicit

Dim RegisterType As seTransformType   '对SuperMap影像图象进行配准方式
Dim TargetNew As Boolean
Dim SourceNew As Boolean
Dim ReSampleTarget As Boolean
Dim ReSampleSource As Boolean

Private Sub CmbType_Click()
    If CmbType.ListIndex < 0 Or CmbType.ListIndex >= CmbType.ListCount Then Exit Sub
    Select Case CmbType.ListIndex
        Case 0: RegisterType = sctRect        '矩形配准
        Case 1: RegisterType = sctLinear      '线性配准
        Case 2: RegisterType = sctSquare      '二项式配准
    End Select
End Sub

Private Sub CmdDelSource_Click()
    If LsvSource.ListItems.Count < 1 Then Exit Sub
    If LsvSource.ListItems.Count < 1 Then Exit Sub

⌨️ 快捷键说明

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