Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents lblEarnings As System.Windows.Forms.Label
    Friend WithEvents lblWage As System.Windows.Forms.Label
    Friend WithEvents LblHour As System.Windows.Forms.Label
    Friend WithEvents lbltot As System.Windows.Forms.Label
    Friend WithEvents cmdcalculate As System.Windows.Forms.Button
    Friend WithEvents txtwage As System.Windows.Forms.TextBox
    Friend WithEvents txtHours As System.Windows.Forms.TextBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.lblEarnings = New System.Windows.Forms.Label
        Me.lblWage = New System.Windows.Forms.Label
        Me.LblHour = New System.Windows.Forms.Label
        Me.lbltot = New System.Windows.Forms.Label
        Me.txtwage = New System.Windows.Forms.TextBox
        Me.txtHours = New System.Windows.Forms.TextBox
        Me.cmdcalculate = New System.Windows.Forms.Button
        Me.SuspendLayout()
        '
        'lblEarnings
        '
        Me.lblEarnings.AutoSize = True
        Me.lblEarnings.Location = New System.Drawing.Point(32, 120)
        Me.lblEarnings.Name = "lblEarnings"
        Me.lblEarnings.Size = New System.Drawing.Size(48, 16)
        Me.lblEarnings.TabIndex = 0
        Me.lblEarnings.Text = "earnings"
        '
        'lblWage
        '
        Me.lblWage.AutoSize = True
        Me.lblWage.Location = New System.Drawing.Point(32, 40)
        Me.lblWage.Name = "lblWage"
        Me.lblWage.Size = New System.Drawing.Size(34, 16)
        Me.lblWage.TabIndex = 1
        Me.lblWage.Text = "Wage"
        '
        'LblHour
        '
        Me.LblHour.AutoSize = True
        Me.LblHour.Location = New System.Drawing.Point(32, 80)
        Me.LblHour.Name = "LblHour"
        Me.LblHour.Size = New System.Drawing.Size(70, 16)
        Me.LblHour.TabIndex = 2
        Me.LblHour.Text = "weekly hours"
        '
        'lbltot
        '
        Me.lbltot.AutoSize = True
        Me.lbltot.Location = New System.Drawing.Point(160, 120)
        Me.lbltot.Name = "lbltot"
        Me.lbltot.Size = New System.Drawing.Size(55, 16)
        Me.lbltot.TabIndex = 3
        Me.lbltot.Text = "11111111"
        '
        'txtwage
        '
        Me.txtwage.Location = New System.Drawing.Point(128, 40)
        Me.txtwage.Name = "txtwage"
        Me.txtwage.TabIndex = 4
        Me.txtwage.Text = ""
        '
        'txtHours
        '
        Me.txtHours.Location = New System.Drawing.Point(128, 80)
        Me.txtHours.Name = "txtHours"
        Me.txtHours.TabIndex = 5
        Me.txtHours.Text = ""
        '
        'cmdcalculate
        '
        Me.cmdcalculate.Location = New System.Drawing.Point(104, 152)
        Me.cmdcalculate.Name = "cmdcalculate"
        Me.cmdcalculate.TabIndex = 6
        Me.cmdcalculate.Text = "calculate"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(264, 197)
        Me.Controls.Add(Me.cmdcalculate)
        Me.Controls.Add(Me.txtHours)
        Me.Controls.Add(Me.txtwage)
        Me.Controls.Add(Me.lbltot)
        Me.Controls.Add(Me.LblHour)
        Me.Controls.Add(Me.lblWage)
        Me.Controls.Add(Me.lblEarnings)
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub

#End Region
    Dim hours As Int16
    Dim wage As Int16
    Dim tot As Int16


    Private Sub cmdcalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcalculate.Click
        wage = Val(txtwage.Text)
        hours = Val(txtHours.Text)
        If hours < 40 Then
            tot = wage * hours
        Else
            tot = ((hours - 40) * 1.5 * wage) + hours * wage
        End If
        lbltot.Text = tot

    End Sub
End Class
