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

📄 settintags.frm

📁 arcgis 编程学习事例
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSetTinTags 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Options"
   ClientHeight    =   1200
   ClientLeft      =   48
   ClientTop       =   288
   ClientWidth     =   3120
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1200
   ScaleWidth      =   3120
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.ComboBox cboSelectMethod 
      Height          =   315
      Left            =   840
      Style           =   2  'Dropdown List
      TabIndex        =   7
      Top             =   480
      Width           =   2175
   End
   Begin VB.CommandButton cmdNo 
      Height          =   315
      Left            =   2400
      MouseIcon       =   "SetTinTags.frx":0000
      TabIndex        =   6
      Top             =   840
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.CommandButton cmdCross 
      Height          =   315
      Left            =   2040
      MouseIcon       =   "SetTinTags.frx":0152
      TabIndex        =   5
      Top             =   840
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.ComboBox cboElementType 
      Height          =   315
      Left            =   840
      Style           =   2  'Dropdown List
      TabIndex        =   4
      Top             =   120
      Width           =   2175
   End
   Begin VB.TextBox txtTag 
      Height          =   285
      Left            =   840
      TabIndex        =   2
      Text            =   "txtTag"
      Top             =   840
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Height          =   315
      Left            =   2760
      Picture         =   "SetTinTags.frx":045C
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   840
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.Label Label1 
      Caption         =   "Method:"
      Height          =   255
      Left            =   120
      TabIndex        =   8
      Top             =   540
      Width           =   615
   End
   Begin VB.Label Label3 
      Caption         =   "Type:"
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   180
      Width           =   615
   End
   Begin VB.Label labTag 
      Caption         =   "Tag:"
      Height          =   255
      Left            =   120
      TabIndex        =   1
      Top             =   885
      Width           =   375
   End
End
Attribute VB_Name = "frmSetTinTags"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

' Copyright 1995-2004 ESRI

' All rights reserved under the copyright laws of the United States.

' You may freely redistribute and use this sample code, with or without modification.

' Disclaimer: THE SAMPLE CODE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 
' WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
' FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESRI OR 
' CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 
' OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
' SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
' INTERRUPTION) SUSTAINED BY YOU OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY 
' THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY 
' WAY OUT OF THE USE OF THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF 
' SUCH DAMAGE.

' For additional information contact: Environmental Systems Research Institute, Inc.

' Attn: Contracts Dept.

' 380 New York Street

' Redlands, California, U.S.A. 92373 

' Email: contracts@esri.com

Option Explicit

Private Sub cboElementType_Click()
  If (cboElementType.ItemData(cboElementType.ListIndex) = 0) Then ' triangle
    If (cboSelectMethod.ListCount = 2) Then ' add choice for flooding
      cboSelectMethod.AddItem "Flood by tag"
      cboSelectMethod.ItemData(2) = 2
      cboSelectMethod.ListIndex = 2
    End If
  Else ' remove choice for flooding
    If (cboSelectMethod.ListCount = 3) Then
      cboSelectMethod.RemoveItem 2
      cboSelectMethod.ListIndex = 0
    End If
  End If
End Sub

Private Sub Form_Load()
  cboElementType.AddItem "Triangle"
  cboElementType.ItemData(0) = esriTinTriangle
  cboElementType.AddItem "Node"
  cboElementType.ItemData(1) = esriTinNode
  cboElementType.AddItem "Edge"
  cboElementType.ItemData(2) = esriTinEdge
  cboElementType.ListIndex = 0
  
  cboSelectMethod.AddItem "Point intersect"
  cboSelectMethod.ItemData(0) = 0
  cboSelectMethod.AddItem "Polygon intersect"
  cboSelectMethod.ItemData(1) = 1
  cboSelectMethod.AddItem "Flood by tag"
  cboSelectMethod.ItemData(2) = 2
  cboSelectMethod.ListIndex = 2
  
  txtTag = "1"
  
  win32Util.FloatWindow Me, True
End Sub

Public Function GetElementType() As esriTinElementType
  GetElementType = cboElementType.ItemData(cboElementType.ListIndex)
End Function

Public Function GetTagValue() As Long
  GetTagValue = CLng(txtTag)
End Function

Public Function GetSelectMethod() As Long
  GetSelectMethod = cboSelectMethod.ItemData(cboSelectMethod.ListIndex)
End Function

⌨️ 快捷键说明

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