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

📄 frmcmdgetfieldvalueproperties.frm

📁 Data monkey是一个强大的是数据传输和转换应用程序。使用DataMonkey用户可以把复杂的文本文件格式
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmCmdGetFieldValueProperties 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Get value from field"
   ClientHeight    =   2232
   ClientLeft      =   2760
   ClientTop       =   3756
   ClientWidth     =   4020
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2232
   ScaleWidth      =   4020
   ShowInTaskbar   =   0   'False
   Begin VB.ComboBox cboFieldName 
      Height          =   315
      Left            =   840
      Style           =   2  'Dropdown List
      TabIndex        =   6
      Top             =   600
      Width           =   3015
   End
   Begin VB.ComboBox cboRecordName 
      Height          =   315
      Left            =   840
      Style           =   2  'Dropdown List
      TabIndex        =   5
      Top             =   120
      Width           =   3015
   End
   Begin VB.CheckBox chkOverwrite 
      Appearance      =   0  'Flat
      BackColor       =   &H80000004&
      Caption         =   "Overwrite existing value"
      ForeColor       =   &H80000008&
      Height          =   375
      Left            =   120
      TabIndex        =   4
      Top             =   1080
      Width           =   3135
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   2880
      TabIndex        =   1
      Top             =   1680
      Width           =   975
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "OK"
      Height          =   375
      Left            =   1680
      TabIndex        =   0
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Field"
      Height          =   195
      Left            =   120
      TabIndex        =   3
      Top             =   600
      Width           =   330
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Record"
      Height          =   195
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   525
   End
End
Attribute VB_Name = "frmCmdGetFieldValueProperties"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' DataMonkey Data Conversion Application. Written by Theodore L. Ward
' Copyright (C) 2002 AstroComma Incorporated.
'
' This program is free software; you can redistribute it and/or
' modify it under the terms of the GNU General Public License
' as published by the Free Software Foundation; either version 2
' of the License, or (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program; if not, write to the Free Software
' Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
' The author may be contacted at:
' TheodoreWard@Hotmail.com or TheodoreWard@Yahoo.com

Option Explicit
Private mImport As CImport

Public Sub Initialize(NameForCaption As String, Import As CImport)
    Dim rec As CInputRecord
    
    ' If no import object was passed in, use the global default.
    If Import Is Nothing Then
        Set mImport = GImport
    Else
        Set mImport = Import
    End If

    ' Load all the records into the combo.
    For Each rec In Import.GetCheckPoints
        Me.cboRecordName.AddItem rec.name
    Next
    
End Sub

Private Sub CancelButton_Click()
    GFormReturnValue = vbCancel
    Me.Hide
End Sub

Private Sub cboRecordName_Click()
    FillFieldCombo cboFieldName, cboRecordName.Text
End Sub

Private Sub OKButton_Click()
    GFormReturnValue = vbOK
    Me.Hide
End Sub

Public Property Let Overwrite(newVal As Boolean)
    Me.chkOverwrite.value = IIf(newVal, 1, 0)
End Property
Public Property Get Overwrite() As Boolean
    Overwrite = IIf(Me.chkOverwrite.value = 1, True, False)
End Property

Public Property Let fieldName(newVal As String)
    Me.cboFieldName.Text = newVal
End Property
Public Property Get fieldName() As String
    fieldName = Me.cboFieldName.Text
End Property

Public Property Let RecordName(newVal As String)
    Me.cboRecordName.Text = newVal
    FillFieldCombo cboFieldName, newVal
End Property
Public Property Get RecordName() As String
    RecordName = Me.cboRecordName.Text
End Property

Private Sub FillFieldCombo(Cbo As ComboBox, RecName As String)
    Dim rec As CInputRecord
    Dim fld As CInputField
    
    Cbo.Clear
    
    If Trim(RecName) = "" Then Exit Sub
    
    Set rec = mImport.GetCheckPointByName(RecName)
    For Each fld In rec.GetDataPoints()
        Cbo.AddItem fld.name
    Next fld
    
    If Cbo.ListCount > 0 Then
        Cbo.ListIndex = 0
    End If
    
End Sub

⌨️ 快捷键说明

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