home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmBenefits
- Caption = "Benefits Menu"
- ClientHeight = 2112
- ClientLeft = 1080
- ClientTop = 1488
- ClientWidth = 3108
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 7.8
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 2112
- ScaleWidth = 3108
- Begin VB.CheckBox chkPlan
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 3
- Top = 1200
- Width = 3015
- End
- Begin VB.CheckBox chkPlan
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 2
- Top = 840
- Width = 3015
- End
- Begin VB.CheckBox chkPlan
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 1
- Top = 480
- Width = 3015
- End
- Begin VB.CheckBox chkPlan
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 3015
- End
- Begin VB.Label lblAmount
- Caption = "$0.00"
- Height = 255
- Left = 2280
- TabIndex = 5
- Top = 1680
- Width = 615
- End
- Begin VB.Label lblTotal
- Caption = "Total monthly payment:"
- Height = 255
- Left = 120
- TabIndex = 4
- Top = 1680
- Width = 2055
- End
- Attribute VB_Name = "frmBenefits"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim price(0 To 3) As Single 'In (Declarations) section of (General)
- Dim sum As Single
- Private Sub chkPlan_Click(Index As Integer)
- If chkPlan(Index).Value = 1 Then
- sum = sum + price(Index)
- Else
- sum = sum - price(Index)
- End If
- lblAmount.Caption = FormatCurrency(sum)
- End Sub
- Private Sub Form_Load()
- Dim i As Integer, plan As String, cost As Single
- Open App.Path & "\BENEFITS.TXT" For Input As #1
- For i = 0 To 3
- Input #1, plan, cost
- price(i) = cost
- chkPlan(i).Caption = plan & " (" & FormatCurrency(cost) & ")"
- Next i
- Close 1
- sum = 0
- End Sub
-