Results 1 to 9 of 9

Thread: Graphical User Interface Design

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2018

    Question Graphical User Interface Design

    There are some things Im having trouble with and some things I need to have checked to see if there correct..Im working step by step..

    My instructions are to:

    1. In the form’s Load event, display the login form modally and exit the application.

    2. In the Click event of the btnAddToBasket button, perform the following steps:

    a. Create a GroceryItem object using the values from the controls and add it to the basket variable.
    Note: Remember the basket variable is the GroceryBasket collection.

    b. Verify all controls except txtScanNumber contain a value.

    c. Set the value of the txtScanNumber control using the following code:
    txtScanNumber.Text = _
    txtBrandName.Text.Substring(0, 3) & “1019”

    d. Instantiate the GroceryItem class, using the control values.

    e. Use the following expression to set the Aisle property. The expression converts the text into an Aisle enumeration.
    [Enum].Parse(GetType(Aisle), cboAisle.Text)

    f. Add the GroceryItem object to the basket variable.

    14. In the Click event of the Exit menu item, end the application.

    15. Have the btnAddToBasket_Click method handle the Click event of AddToolStripMenuItem as well.

    16. In the Click event of the View menu item, display all of the items in the basket variable in an informational message box. You need only display the Aisle, ScanNumber and BrandName properties.

    Here is my GroceryItemForm Code:

    Public Class GroceryItemForm
        Private Sub GroceryItemForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load, BasketToolStripMenuItem.Click, MyBase.Click, btnAddToBasket.Click, AddToolStripMenuItem.Click
        End Sub
        Private Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs) Handles txtDescription.TextChanged
        End Sub
        Private Sub txtScanNumber_TextChanged(sender As Object, e As EventArgs) Handles txtScanNumber.TextChanged
            txtScanNumber.Text =
         txtBrandName.Text.Substring(0, 3) & “1019”
        End Sub
        Private Sub cboAisle_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboAisle.SelectedIndexChanged
            [Enum].Parse(GetType(Aisle), cboAisle.Text)
        End Sub
        Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click
        End Sub
        Private Sub ViewToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ViewToolStripMenuItem.Click
        End Sub
    End Class
    And here is my LoginForm Code:

    Public Class LoginForm
        Private Sub btnLogin_Click(sender As Object, e As EventArgs) Handles btnLogin.Click
                Login(txtUsername.Text, txtPassword.Text)
            Catch ex As LoginException
                MessageBox.Show(“Incorrect password.”)
            End Try
            If Main.blnLoggedIn Then
                MessageBox.Show(“Thank you for logging in, “ & txtUsername.Text, “Logged In.”)
            End If
        End Sub
        Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
        End Sub
    End Class

    I know its alot but im a beginner so Im learning how to do all of this along the way..Thanks for your help!
    Last edited by EmilyM1105; Feb 7th, 2018 at 12:00 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width