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

📄 frmmodifytheme.frm

📁 GIS地理信息系统开发。大名鼎鼎的MAPX+VisualBasic6.0软件开发
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmModifyTheme 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Pick a Theme to Modify"
   ClientHeight    =   1455
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   3690
   Icon            =   "frmModifyTheme.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1455
   ScaleWidth      =   3690
   ShowInTaskbar   =   0   'False
   Begin VB.ComboBox ThemeCombo 
      Height          =   315
      Left            =   240
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   480
      Width           =   3255
   End
   Begin VB.CommandButton cmdRemove 
      Caption         =   "Remove"
      Height          =   375
      Left            =   2520
      TabIndex        =   4
      Top             =   960
      Width           =   975
   End
   Begin VB.CommandButton CancelButton 
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      Height          =   375
      Left            =   1440
      TabIndex        =   1
      Top             =   960
      Width           =   975
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "Modify..."
      Default         =   -1  'True
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   960
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "Theme to Modify:"
      Height          =   255
      Left            =   240
      TabIndex        =   3
      Top             =   240
      Width           =   2055
   End
End
Attribute VB_Name = "frmModifyTheme"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

' This sample application and corresponding sample code is provided
' for example purposes only.  It has not undergone rigorous testing
' and as such should not be shipped as part of a final application
' without extensive testing on the part of the organization releasing
' the end-user product.

Private Sub CancelButton_Click()
    Unload Me
End Sub

Private Sub cmdRemove_Click()
    Dim DatasetNumber As Integer
    ' Retrieve the index of the dataset to which the theme
    ' belongs from the ItemData field
    DatasetNumber = ThemeCombo.ItemData(ThemeCombo.ListIndex)
    ' Remove the chosen theme
    fMainForm.Map1.Datasets.Item(DatasetNumber).Themes.Remove ThemeCombo.Text
    Unload Me
End Sub

Private Sub Form_Load()
    Dim thm As Theme
    Dim DatasetNumber As Integer
    Dim ComboItemNumber As Integer
    ComboItemNumber = 0 ' This stores the index of the
                        ' current item.
    
    ' Build a list of every theme on the map.  We use a
    ' trick: to store which dataset each theme belongs to,
    ' we use the ItemData field of the combobox to store
    ' the index of the dataset.
    
    ' First, loop over each dataset
    For DatasetNumber = 1 To fMainForm.Map1.Datasets.Count
        ' Now, for each dataset, loop over every theme on
        ' that dataset
        For Each thm In fMainForm.Map1.Datasets(DatasetNumber).Themes
            ' Add the theme to the combobox, and set the
            ' item data to the dataset number
            ThemeCombo.AddItem thm.Name
            ThemeCombo.ItemData(ComboItemNumber) = DatasetNumber
            ComboItemNumber = ComboItemNumber + 1
        Next
    Next
    
    ThemeCombo.ListIndex = 0
End Sub

Private Sub OKButton_Click()
    Dim DatasetNumber As Integer
    ' Retrieve the index of the dataset from the ItemData
    ' field of the combobox
    DatasetNumber = ThemeCombo.ItemData(ThemeCombo.ListIndex)
    Unload Me
    ' Display the ThemeDlg (Builtin MapX Theme Modification dialog)
    fMainForm.Map1.Datasets(DatasetNumber).Themes(ThemeCombo.Text).ThemeDlg
End Sub

⌨️ 快捷键说明

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