Public Class frmOrder

  'frmOrder's code   (startup form)
  Private Sub frmOrder_Load(ByVal sender As System.Object,
                            ByVal e As System.EventArgs) Handles MyBase.Load
    frmLogin.ShowDialog()
    txtUserName.Text = frmLogin.userName
  End Sub

  Private Sub btnProcess_Click(ByVal sender As System.Object,
                               ByVal e As System.EventArgs) Handles btnProcess.Click
    Dim numItems As Integer
    Dim totalCost As Double
    numItems = CInt(txtNumItems.Text)
    totalCost = (numItems * 20) + 8  'cost per item: $20; shipping cost: $8
    txtTotalCost.Text = FormatCurrency(totalCost)
  End Sub

  Private Sub btnLogOut_Click(ByVal sender As System.Object,
                              ByVal e As System.EventArgs) Handles btnLogOut.Click
    Me.Close()
  End Sub

End Class