储蓄顾问.frm
来自「算法教案」· FRM 代码 · 共 77 行
FRM
77 行
VERSION 5.00
Begin VB.Form Form1
Caption = "储蓄顾问"
ClientHeight = 2730
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 2730
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "需要存多少年?"
Height = 495
Left = 120
TabIndex = 5
Top = 1800
Width = 1695
End
Begin VB.TextBox Text3
Height = 375
Left = 2280
Locked = -1 'True
TabIndex = 4
Top = 1920
Width = 1815
End
Begin VB.TextBox Text2
Height = 375
Left = 2280
TabIndex = 3
Top = 1080
Width = 1815
End
Begin VB.TextBox Text1
Height = 375
Left = 2280
TabIndex = 2
Top = 360
Width = 1815
End
Begin VB.Label Label2
Caption = "请输入税后本息:"
Height = 375
Left = 240
TabIndex = 1
Top = 1080
Width = 1575
End
Begin VB.Label Label1
Caption = "请输入存款额:"
Height = 375
Left = 240
TabIndex = 0
Top = 360
Width = 1455
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 x As Double
m = Val(Text1.Text)
k = Val(Text2.Text)
x = (k - m) / (0.028 * m)
y = Fix(x)
If y < x Then y = y + 1
Text3.Text = "存款应为" + Str(y) + "年"
End Sub
Private Sub Text1_Click()
Text1.Text = "": Text2.Text = "": Text3.Text = ""
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?