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

📄 frmsurfaceaspect.frm

📁 都是基于VB所做的程序集合,值得大家作为实践的参考资料.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSurfaceAspect 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "构建坡向图"
   ClientHeight    =   3090
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4905
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3090
   ScaleWidth      =   4905
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   435
      Left            =   3690
      TabIndex        =   11
      Top             =   2490
      Width           =   945
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定"
      Height          =   435
      Left            =   2595
      TabIndex        =   10
      Top             =   2490
      Width           =   945
   End
   Begin VB.Frame Frame4 
      Caption         =   "结果数据集保存"
      Height          =   1140
      Left            =   1500
      TabIndex        =   5
      Top             =   1230
      Width           =   3390
      Begin VB.ComboBox cmbDsListResult 
         Height          =   315
         Left            =   1095
         Style           =   2  'Dropdown List
         TabIndex        =   7
         Top             =   285
         Width           =   2070
      End
      Begin VB.TextBox txtDataset 
         Height          =   315
         Left            =   1095
         TabIndex        =   6
         Text            =   "Raster"
         Top             =   660
         Width           =   2070
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "数据源:"
         Height          =   195
         Index           =   6
         Left            =   340
         TabIndex        =   9
         Top             =   330
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "数据集:"
         Height          =   195
         Index           =   7
         Left            =   340
         TabIndex        =   8
         Top             =   705
         Width           =   720
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "参加分析的数据"
      Height          =   1170
      Left            =   1500
      TabIndex        =   0
      Top             =   30
      Width           =   3390
      Begin VB.ComboBox cmbDsList 
         Height          =   315
         Left            =   1095
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   255
         Width           =   2100
      End
      Begin VB.ComboBox cmbDtList 
         Height          =   315
         Left            =   1095
         Style           =   2  'Dropdown List
         TabIndex        =   1
         Top             =   705
         Width           =   2100
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "数据源:"
         Height          =   195
         Index           =   0
         Left            =   340
         TabIndex        =   4
         Top             =   330
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "数据集:"
         Height          =   195
         Index           =   1
         Left            =   340
         TabIndex        =   3
         Top             =   705
         Width           =   720
      End
   End
   Begin VB.Image Image1 
      Appearance      =   0  'Flat
      BorderStyle     =   1  'Fixed Single
      Height          =   3030
      Left            =   45
      Picture         =   "frmSurfaceAspect.frx":0000
      Stretch         =   -1  'True
      Top             =   45
      Width           =   1440
   End
End
Attribute VB_Name = "frmSurfaceAspect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmbDsList_Click()
    If cmbDsList.Text = "" Then Exit Sub
    If frmMain.bActiveFrm Then
        ChangeDs cmbDsList.Text, cmbDtList
    End If
End Sub

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOk_Click()
    Dim objDs As soDataSource
    Dim objDtRst As soDatasetRaster
    Dim objSurfaceAnalyst As soSurfaceAnalyst
    Dim objSurfaceOperator As soSurfaceOperator
    Dim strTmp As String
    
    Set objDs = frmMain.SuperWorkspace.Datasources(cmbDsList.Text)
    Set objDtRst = objDs.Datasets(cmbDtList.Text)
    Set objDs = frmMain.SuperWorkspace.Datasources(cmbDsListResult.Text)
    strTmp = DataSetName(objDs, txtDataset.Text)
    If strTmp <> "" Then
        Set objSurfaceAnalyst = frmMain.SuperAnalyst.SurfaceAnalyst
        Set objSurfaceOperator = objSurfaceAnalyst.Surface
        Set objDtRst = objSurfaceOperator.Aspect(objDtRst, objDs, strTmp)
        If Not objDtRst Is Nothing Then
            frmMain.SuperWkspManager.Refresh
        Else
            MsgBox "生成坡向图失败", vbInformation, "信息提示"
        End If
        Set objDtRst = Nothing
        Set objDs = Nothing
        Set objSurfaceAnalyst = Nothing
        Set objSurfaceOperator = Nothing
        Unload Me
    Else
        txtDataset.Text = ""
        txtDataset.SetFocus
    End If
    
    Set objDtRst = Nothing
    Set objDs = Nothing
    Set objSurfaceAnalyst = Nothing
    Set objSurfaceOperator = Nothing
End Sub

Private Sub Form_Activate()
    frmMain.bActiveFrm = True
    cmbDsList_Click
End Sub

⌨️ 快捷键说明

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