📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form frmFmtCur
Caption = "Formatting currency values"
ClientHeight = 2835
ClientLeft = 60
ClientTop = 345
ClientWidth = 3855
LinkTopic = "Form1"
ScaleHeight = 2835
ScaleWidth = 3855
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txtOutput
Height = 285
Left = 120
TabIndex = 8
Top = 720
Width = 3615
End
Begin VB.CheckBox chkParentheses
Caption = "Use parentheses for negatives"
Height = 255
Left = 120
TabIndex = 6
Top = 2280
Width = 2655
End
Begin VB.CheckBox chkLeadDigit
Caption = "Incude leading digit"
Height = 255
Left = 120
TabIndex = 5
Top = 2040
Width = 1935
End
Begin VB.CommandButton cmdFormat
Caption = "Format"
Height = 285
Left = 2040
TabIndex = 4
Top = 360
Width = 1695
End
Begin VB.ComboBox cboNumDigits
Height = 315
ItemData = "Form1.frx":0000
Left = 120
List = "Form1.frx":0016
TabIndex = 2
Text = "0"
Top = 1560
Width = 2535
End
Begin VB.TextBox txtInput
Height = 285
Left = 120
TabIndex = 1
Top = 360
Width = 1815
End
Begin VB.CheckBox chkGroupDigits
Caption = "Group digits"
Height = 255
Left = 120
TabIndex = 7
Top = 2520
Width = 1215
End
Begin VB.Label lblNumDigits
Caption = "Number of digits after decimal point"
Height = 255
Left = 120
TabIndex = 3
Top = 1320
Width = 2535
End
Begin VB.Label lblInput
Caption = "Enter value to format"
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 1815
End
End
Attribute VB_Name = "frmFmtCur"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 8.19
' Demonstrating the FormatCurrency function
Option Explicit
Private Sub cmdFormat_Click()
Dim numDigits As Integer, leadDigit As Boolean, _
parens As Boolean, group As Boolean
numDigits = cboNumDigits.Text
leadDigit = chkLeadDigit.Value
parens = chkParentheses.Value
group = chkGroupDigits.Value
txtOutput.Text = FormatCurrency(txtInput.Text, _
numDigits, leadDigit, parens, group)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -