📄 计算本利和.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "银行计算本利和"
ClientHeight = 3195
ClientLeft = 555
ClientTop = 1380
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "计算本利和"
Height = 615
Left = 960
TabIndex = 6
Top = 2040
Width = 1935
End
Begin VB.TextBox Text3
Height = 495
Left = 3720
TabIndex = 5
Top = 240
Width = 735
End
Begin VB.TextBox Text2
Height = 495
Left = 1680
TabIndex = 4
Top = 240
Width = 855
End
Begin VB.TextBox Text1
Height = 495
Left = 480
TabIndex = 3
Top = 240
Width = 735
End
Begin VB.Label Label4
Caption = "pl="
Height = 735
Left = 840
TabIndex = 7
Top = 960
Width = 2295
End
Begin VB.Label Label3
Caption = "r="
Height = 615
Left = 3360
TabIndex = 2
Top = 360
Width = 855
End
Begin VB.Label Label2
Caption = "n="
Height = 615
Left = 1440
TabIndex = 1
Top = 360
Width = 855
End
Begin VB.Label Label1
Caption = "p="
Height = 495
Left = 240
TabIndex = 0
Top = 360
Width = 495
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 n As Integer, p As Single
Dim r As Single, pl As Single
p = Text1.Text
n = Text2.Text
r = Text3.Text
pl = p * (1 + r) ^ n
pl = Int(pl * 100 + 0.5) / 100
Label4.Caption = Label4.Caption + Format(pl)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -