home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frm7_3_1
- ClientHeight = 2985
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 2910
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 2985
- ScaleWidth = 2910
- Begin VB.PictureBox picTotal
- Height = 375
- Left = 120
- ScaleHeight = 315
- ScaleWidth = 2595
- TabIndex = 11
- Top = 2520
- Width = 2655
- End
- Begin VB.CommandButton cmdCompute
- Caption = "Compute Total Sales"
- Height = 495
- Left = 480
- TabIndex = 10
- Top = 1920
- Width = 1935
- End
- Begin VB.TextBox txtSales
- Height = 285
- Index = 4
- Left = 1800
- TabIndex = 9
- Top = 1560
- Width = 975
- End
- Begin VB.TextBox txtSales
- Height = 285
- Index = 3
- Left = 1800
- TabIndex = 8
- Top = 1200
- Width = 975
- End
- Begin VB.TextBox txtSales
- Height = 285
- Index = 2
- Left = 1800
- TabIndex = 7
- Top = 840
- Width = 975
- End
- Begin VB.TextBox txtSales
- Height = 285
- Index = 1
- Left = 1800
- TabIndex = 6
- Top = 480
- Width = 975
- End
- Begin VB.TextBox txtSales
- Height = 285
- Index = 0
- Left = 1800
- TabIndex = 5
- Top = 120
- Width = 975
- End
- Begin VB.Label lblDepart
- Alignment = 1 'Right Justify
- Caption = "Label1"
- Height = 255
- Index = 4
- Left = 120
- TabIndex = 4
- Top = 1560
- Width = 1455
- End
- Begin VB.Label lblDepart
- Alignment = 1 'Right Justify
- Caption = "Label1"
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 3
- Top = 1200
- Width = 1455
- End
- Begin VB.Label lblDepart
- Alignment = 1 'Right Justify
- Caption = "Label1"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 2
- Top = 840
- Width = 1455
- End
- Begin VB.Label lblDepart
- Alignment = 1 'Right Justify
- Caption = "Label1"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 1
- Top = 480
- Width = 1455
- End
- Begin VB.Label lblDepart
- Alignment = 1 'Right Justify
- Caption = "Label1"
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 1455
- End
- Attribute VB_Name = "frm7_3_1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Form_Load()
- Dim depNum As Integer
- For depNum = 0 To 4
- lblDepart(depNum).Caption = "Department" & Str(depNum + 1)
- Next depNum
- End Sub
- Private Sub cmdCompute_Click()
- Dim depNum As Integer, sales As Single
- sales = 0
- For depNum = 0 To 4
- sales = sales + Val(txtSales(depNum).Text)
- Next depNum
- picTotal.Cls
- picTotal.Print "Total sales were " & FormatCurrency(sales)
- End Sub
-