📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "例[5-6] 计算购物款"
ClientHeight = 1875
ClientLeft = 60
ClientTop = 345
ClientWidth = 4140
LinkTopic = "Form1"
ScaleHeight = 1875
ScaleWidth = 4140
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "结束"
Height = 375
Left = 2880
TabIndex = 7
Top = 1200
Width = 975
End
Begin VB.CommandButton Command1
Caption = "开始"
Height = 375
Left = 2880
TabIndex = 6
Top = 480
Width = 975
End
Begin VB.TextBox Text3
Height = 375
Left = 1320
TabIndex = 5
Text = "Text3"
Top = 1200
Width = 1215
End
Begin VB.TextBox Text2
Height = 375
Left = 1320
TabIndex = 4
Text = "Text2"
Top = 720
Width = 1215
End
Begin VB.TextBox Text1
Height = 375
Left = 1320
TabIndex = 3
Text = "Text1"
Top = 240
Width = 1215
End
Begin VB.Label Label3
Caption = "实付款"
Height = 345
Left = 240
TabIndex = 2
Top = 1320
Width = 1005
End
Begin VB.Label Label2
Caption = "折 扣"
Height = 345
Left = 240
TabIndex = 1
Top = 840
Width = 1005
End
Begin VB.Label Label1
Caption = "应付款"
Height = 345
Left = 240
TabIndex = 0
Top = 360
Width = 1005
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim m As Single, d As Single
m = InputBox("请输应付款:")
Select Case m
Case Is < 250
d = 0
Case Is < 500
d = 0.05
Case Is < 1000
d = 0.075
Case Is < 2000
d = 0.1
Case Else
d = 0.15
End Select
Text1.Text = Str$(m)
Text2.Text = Str$(d)
Text3.Text = Str$(m * (1 - d))
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -