Public Class frmStatus

  Private Sub btnShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShow.Click
    Dim costs, revenue, profit, loss As Double
    costs = CDbl(txtCosts.Text)
    revenue = CDbl(txtRev.Text)
    If costs = revenue Then
      txtResult.Text = "Break even"
    Else
      If costs < revenue Then
        profit = revenue - costs
        txtResult.Text = "Profit is " & FormatCurrency(profit) & "."
      Else
        loss = costs - revenue
        txtResult.Text = "Loss is " & FormatCurrency(loss) & "."
      End If
    End If
  End Sub

End Class
