VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "滚动条应用示例"
   ClientHeight    =   2835
   ClientLeft      =   1095
   ClientTop       =   1515
   ClientWidth     =   4530
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   12
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   2835
   ScaleWidth      =   4530
   Begin VB.TextBox Text3 
      Height          =   345
      Left            =   3120
      TabIndex        =   13
      Top             =   960
      Width           =   855
   End
   Begin VB.HScrollBar HScroll2 
      Height          =   255
      LargeChange     =   5
      Left            =   2040
      Max             =   15
      Min             =   1
      TabIndex        =   12
      Top             =   1440
      Value           =   1
      Width           =   2175
   End
   Begin VB.TextBox Text5 
      Height          =   345
      Left            =   2400
      TabIndex        =   10
      Top             =   2280
      Width           =   1215
   End
   Begin VB.TextBox Text4 
      Height          =   345
      Left            =   720
      TabIndex        =   8
      Top             =   2280
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Height          =   345
      Left            =   3120
      TabIndex        =   5
      Top             =   120
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   345
      Left            =   480
      TabIndex        =   4
      Top             =   600
      Width           =   975
   End
   Begin VB.VScrollBar VScroll1 
      Height          =   1695
      Left            =   120
      Max             =   1000
      SmallChange     =   10
      TabIndex        =   11
      Top             =   120
      Width           =   255
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   255
      LargeChange     =   12
      Left            =   2040
      Max             =   120
      Min             =   1
      TabIndex        =   0
      Top             =   600
      Value           =   1
      Width           =   2175
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "利息+本金："
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   2400
      TabIndex        =   9
      Top             =   1920
      Width           =   1320
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "利息："
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   720
      TabIndex        =   7
      Top             =   1920
      Width           =   720
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "年利率%："
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   2040
      TabIndex        =   6
      Top             =   1080
      Width           =   1080
   End
   Begin VB.Label Label3 
      Caption         =   "Label3"
      Height          =   15
      Left            =   120
      TabIndex        =   3
      Top             =   840
      Width           =   135
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "本金："
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   480
      TabIndex        =   2
      Top             =   120
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "月  份："
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   2040
      TabIndex        =   1
      Top             =   240
      Width           =   960
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub calc()
    Dim Slx As Single, Slxbj As Single
    Slxbj = VScroll1.Value * (1 + Val(Text3.Text) / 100 * HScroll1.Value / 12)
    Text5.Text = Slxbj
    Text4.Text = Slxbj - VScroll1.Value
End Sub

Private Sub HScroll1_Change()
    Text2.Text = HScroll1.Value
End Sub
Private Sub HScroll2_Change()
    Text3.Text = Format(HScroll2.Value, "0.00")
End Sub

Private Sub Text1_Change()
    calc
End Sub

Private Sub Text2_Change()
    calc
End Sub

Private Sub Text3_Change()
    calc
End Sub

Private Sub VScroll1_Change()
    Text1.Text = VScroll1.Value
End Sub
