VERSION 5.00
Begin VB.Form Form1
Caption = "利息計算器"
ClientHeight = 2655
ClientLeft = 60
ClientTop = 450
ClientWidth = 3855
LinkTopic = "Form1"
ScaleHeight = 2655
ScaleWidth = 3855
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "計算"
BeginProperty Font
Name = "宋體"
Size = 26.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 120
TabIndex = 15
Top = 840
Width = 1455
End
Begin VB.Frame Frame2
Caption = "結果"
Height = 855
Left = 2760
TabIndex = 12
Top = 480
Width = 975
Begin VB.OptionButton lx
Caption = "利息"
Height = 255
Left = 120
TabIndex = 14
Top = 480
Width = 735
End
Begin VB.OptionButton bx
Caption = "本息"
Height = 255
Left = 120
TabIndex = 13
Top = 240
Value = -1 'True
Width = 735
End
End
Begin VB.Frame Frame1
Caption = "存期"
Height = 1215
Left = 1680
TabIndex = 8
Top = 480
Width = 975
Begin VB.OptionButton y
Caption = "月"
Height = 255
Left = 120
TabIndex = 11
Top = 840
Width = 735
End
Begin VB.OptionButton n
Caption = "年"
Height = 255
Left = 120
TabIndex = 10
Top = 600
Value = -1 'True
Width = 735
End
Begin VB.TextBox Text4
Height = 270
Left = 120
TabIndex = 9
Text = "5"
Top = 240
Width = 735
End
End
Begin VB.TextBox Text3
Height = 270
Left = 840
TabIndex = 6
Text = "0.00"
Top = 480
Width = 495
End
Begin VB.TextBox Text2
Height = 270
Left = 2760
TabIndex = 3
Text = "0.00"
Top = 120
Width = 495
End
Begin VB.TextBox Text1
Height = 270
Left = 720
TabIndex = 1
Text = "1000.00"
Top = 120
Width = 1215
End
Begin VB.Label Label7
Caption = "請先計算"
BeginProperty Font
Name = "宋體"
Size = 36
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 120
TabIndex = 17
Top = 1800
Width = 3615
End
Begin VB.Label Label5
Caption = "結果:"
Height = 255
Left = 2760
TabIndex = 16
Top = 1440
Width = 615
End
Begin VB.Label Label6
Caption = "%"
Height = 255
Left = 1440
TabIndex = 7
Top = 480
Width = 255
End
Begin VB.Label Label4
Caption = "利息稅:"
Height = 255
Left = 120
TabIndex = 5
Top = 480
Width = 735
End
Begin VB.Label Label3
Caption = "%"
Height = 255
Left = 3360
TabIndex = 4
Top = 120
Width = 255
End
Begin VB.Label Label2
Caption = "年利率:"
Height = 255
Left = 2040
TabIndex = 2
Top = 120
Width = 855
End
Begin VB.Label Label1
Caption = "本金:"
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 975
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()
bj = Val(Text1.Text)
nll = Val(Text2.Text) / 100
lxs = Val(Text3.Text) / 100
If n.Value Then
cq = Val(Text4.Text)
Else
cq = Val(Text4.Text) / 12
End If
lxjg = bj * cq * nll * (1 - lxs)
If lx.Value Then
Label7.Caption = lxjg
Else
Label7.Caption = lxjg + bj
End If
End Sub