📄 frmcmdgetvalueproperties.frm
字号:
VERSION 5.00
Begin VB.Form frmCMDGetValueProperties
BorderStyle = 4 'Fixed ToolWindow
Caption = "GetValue action properties"
ClientHeight = 3432
ClientLeft = 48
ClientTop = 288
ClientWidth = 5544
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3432
ScaleWidth = 5544
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton btnCancel
Caption = "&Cancel"
Height = 375
Left = 4560
TabIndex = 6
Top = 2880
Width = 855
End
Begin VB.CommandButton btnOk
Caption = "&Ok"
Default = -1 'True
Height = 375
Left = 3600
TabIndex = 5
Top = 2880
Width = 855
End
Begin VB.PictureBox Picture2
Appearance = 0 'Flat
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 408
Left = 120
Picture = "frmCMDGetValueProperties.frx":0000
ScaleHeight = 384
ScaleWidth = 384
TabIndex = 11
Top = 120
Width = 408
End
Begin VB.Frame fraGetValue
Height = 1815
Left = 120
TabIndex = 0
Top = 840
Width = 5295
Begin VB.CheckBox chkOverwrite
Appearance = 0 'Flat
Caption = "Overwrite value currently contained in this field"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 13
Top = 1440
Value = 1 'Checked
Width = 4935
End
Begin VB.CheckBox chkTrimSpaces
Appearance = 0 'Flat
Caption = "Trim extra spaces from in front of and behind this data item"
ForeColor = &H80000008&
Height = 255
Left = 120
TabIndex = 12
Top = 1200
Value = 1 'Checked
Width = 4935
End
Begin VB.TextBox txtLength
Appearance = 0 'Flat
Height = 285
Left = 840
TabIndex = 2
Text = "1"
Top = 600
Width = 855
End
Begin VB.TextBox txtSeparator
Appearance = 0 'Flat
Height = 285
Left = 2280
TabIndex = 4
Top = 720
Width = 1215
End
Begin VB.CheckBox chkDelimited
Appearance = 0 'Flat
BackColor = &H80000004&
Caption = "The items of data on this line are separated by the following character(s):"
ForeColor = &H80000008&
Height = 375
Left = 2040
TabIndex = 3
Top = 240
Width = 3135
End
Begin VB.TextBox txtPosition
Appearance = 0 'Flat
Height = 285
Left = 840
TabIndex = 1
Text = "1"
Top = 240
Width = 855
End
Begin VB.Label Label2
Caption = "Position:"
Height = 255
Left = 120
TabIndex = 8
Top = 240
Width = 615
End
Begin VB.Label lblLength
Caption = "Length:"
Height = 255
Left = 120
TabIndex = 7
Top = 600
Width = 615
End
End
Begin VB.Label lblNotDelimited
Caption = $"frmCMDGetValueProperties.frx":0282
Height = 615
Left = 840
TabIndex = 9
Top = 120
Width = 4575
End
Begin VB.Label lblDelimited
Caption = "POSITION should represent the number of delimiters between this data item and the beginning of the line plus one."
Height = 435
Left = 840
TabIndex = 10
Top = 120
Width = 4605
End
End
Attribute VB_Name = "frmCMDGetValueProperties"
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 mGV As CCmdGetValue
Public Sub Initialize(theParent As CCmdGetValue, NameForCaption As String)
Set mGV = theParent
Me.Caption = "Get Value For " & NameForCaption
Me.chkDelimited.value = IIf(mGV.Delimited, 1, 0)
Me.txtLength = mGV.Length
Me.txtPosition = mGV.Position
Me.txtSeparator = mGV.Delimiter
Me.chkTrimSpaces = IIf(mGV.TrimSpaces, 1, 0)
Me.chkOverwrite = IIf(mGV.Append, 0, 1)
End Sub
Private Sub btnCancel_Click()
GFormReturnValue = vbCancel
Unload Me
End Sub
Private Sub btnOk_Click()
mGV.Delimited = IIf(chkDelimited.value = 1, True, False)
mGV.Length = txtLength.Text
mGV.Position = txtPosition.Text
mGV.Delimiter = txtSeparator.Text
mGV.TrimSpaces = IIf(chkTrimSpaces.value = 1, True, False)
mGV.Append = IIf(chkOverwrite.value = 1, False, True)
Set mGV = Nothing
GFormReturnValue = vbOK
Unload Me
End Sub
Private Sub chkDelimited_Click()
If chkDelimited.value = 0 Then
txtLength.Visible = True
Me.lblLength.Visible = True
lblDelimited.Visible = False
lblNotDelimited.Visible = True
txtSeparator.Enabled = False
Else
txtLength.Visible = False
lblLength.Visible = False
lblDelimited.Visible = True
lblNotDelimited.Visible = False
txtSeparator.Enabled = True
End If
End Sub
Private Sub Form_Load()
GFormReturnValue = vbCancel
Me.left = (Screen.Width - Me.Width) / 2
Me.top = (Screen.Height - Me.Height) / 2
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -