VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   6585
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9150
   LinkTopic       =   "Form1"
   ScaleHeight     =   6585
   ScaleWidth      =   9150
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtCost 
      Height          =   615
      Left            =   960
      TabIndex        =   9
      Top             =   2640
      Width           =   2295
   End
   Begin VB.TextBox txtSales 
      Height          =   615
      Left            =   960
      TabIndex        =   8
      Top             =   1920
      Width           =   2295
   End
   Begin VB.TextBox Text2 
      Height          =   615
      Left            =   960
      TabIndex        =   7
      Top             =   1200
      Width           =   2295
   End
   Begin VB.CommandButton cmdClear 
      Cancel          =   -1  'True
      Caption         =   "Clear"
      Height          =   615
      Index           =   6
      Left            =   5760
      TabIndex        =   2
      Top             =   4080
      Width           =   2295
   End
   Begin VB.CommandButton cmdCalculate 
      Caption         =   "Calculate"
      Default         =   -1  'True
      Height          =   615
      Index           =   4
      Left            =   960
      TabIndex        =   1
      Top             =   4080
      Width           =   2295
   End
   Begin VB.CommandButton cmdPrint 
      Caption         =   "Print"
      Enabled         =   0   'False
      Height          =   615
      Index           =   0
      Left            =   3360
      TabIndex        =   0
      Top             =   4080
      Width           =   2295
   End
   Begin VB.Label lblCommission 
      Caption         =   "Label2"
      Height          =   735
      Left            =   3360
      TabIndex        =   10
      Top             =   3360
      Width           =   4575
   End
   Begin VB.Label lblComm 
      Caption         =   "Commission"
      Height          =   615
      Index           =   0
      Left            =   960
      TabIndex        =   6
      Top             =   3360
      Width           =   2295
   End
   Begin VB.Label lblCost 
      Caption         =   "Cost of the Vehicle"
      Height          =   615
      Index           =   4
      Left            =   3360
      TabIndex        =   5
      Top             =   2640
      Width           =   4695
   End
   Begin VB.Label Label1 
      Caption         =   "Vehicle Sale Price"
      Height          =   615
      Index           =   3
      Left            =   3360
      TabIndex        =   4
      Top             =   1920
      Width           =   4695
   End
   Begin VB.Label Label1 
      Caption         =   "Salesperson"
      Height          =   615
      Index           =   0
      Left            =   3360
      TabIndex        =   3
      Top             =   1200
      Width           =   4695
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCalculate_Click(Index As Integer)
    lblCommission.Caption = CStr(Val(txtSales.Text) - Val(txtCost.Text) * 0.2)
End Sub

Private Sub cmdClear_Click(Index As Integer)
Dim ctl As Control

    For Each ctl In Controls
        If TypeOf ctl Is TextBox Then ctl.Text = vbNullString
    Next

End Sub

Private Sub cmdPrint_Click(Index As Integer)
    Print Form
End Sub
