Question

This project allows you to create a new graphical user interface and apply what you learned...

This project allows you to create a new graphical user interface and apply what you learned in this unit to your application project. Be sure to include the following in your interface:

  1. Radio buttons that limit the user to only one choice (nested selection structure)
  2. A group box for your radio buttons
  3. Controls to prevent unwanted characters in text boxes
  4. At least one message box
  5. At least one select case statement

Using Visual Basic

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Below is the solution:

Design:

Code:

Public Class frmMain
    Private Sub txtName_KeyPressed(sender As Object, e As KeyPressEventArgs)
        'allow only To enter the letter and digit and back key
        If Not Char.IsLetterOrDigit(e.KeyChar) Or e.KeyChar = ControlChars.Back Then
            e.Handled = True
        End If
    End Sub

    Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        CenterToScreen() 'center form on the screen
        rbtnFemale.Checked = False
        rbtnMale.Checked = False
        rbtnOthers.Checked = False
    End Sub

    Private Sub txtName_KeyDown(sender As Object, e As KeyEventArgs) Handles txtName.KeyDown
        Dim gender As String
        If e.KeyCode = Keys.Enter Then 'Enter button pressed event detect
            If txtName.Text = "" Then
                MessageBox.Show("Please enter Name")
            Else
                Select Case True
                    Case rbtnFemale.Checked
                        gender = "Female"
                    Case rbtnMale.Checked
                        gender = "Male"
                    Case rbtnOthers.Checked
                        gender = "Others"
                    Case Else
                        MessageBox.Show("Please select gender")
                End Select
            End If
            MessageBox.Show("Name is: " & txtName.Text & vbNewLine & "Gender is: " & gender)
        End If
    End Sub
End Class

sample output:

Add a comment
Know the answer?
Add Answer to:
This project allows you to create a new graphical user interface and apply what you learned...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I. User Interface Create a JavaFX application with a graphical user interface (GUI) based on the...

    I. User Interface Create a JavaFX application with a graphical user interface (GUI) based on the attached “GUI Mock-Up”. Write code to display each of the following screens in the GUI: A. A main screen, showing the following controls: • buttons for “Add”, “Modify”, “Delete”, “Search” for parts and products, and “Exit” • lists for parts and products • text boxes for searching for parts and products • title labels for parts, products, and the application title B. An add...

  • VII JAVA ASSIGNMENT. Write a program with a graphical interface that allows the user to convert...

    VII JAVA ASSIGNMENT. Write a program with a graphical interface that allows the user to convert an amount of money between U.S. dollars (USD), euros (EUR), and British pounds (GBP). The user interface should have the following elements: a text box to enter the amount to be converted, two combo boxes to allow the user to select the currencies, a button to make the conversion, and a label to show the result. Display a warning if the user does not...

  • JAVA Developing a graphical user interface in programming is paramount to being successful in the business...

    JAVA Developing a graphical user interface in programming is paramount to being successful in the business industry. This project incorporates GUI techniques with other tools that you have learned about in this class. Here is your assignment: You work for a flooring company. They have asked you to be a part of their team because they need a computer programmer, analyst, and designer to aid them in tracking customer orders. Your skills will be needed in creating a GUI program...

  • Create a user friendly interface to order a pizza. Use appropriate controls (radio buttons, list boxes,...

    Create a user friendly interface to order a pizza. Use appropriate controls (radio buttons, list boxes, check boxes) to obtain the type of pizza (e.g. small, medium, large) and the toppings. Calculate the cost of the pizza based upon the size, number of toppings and delivery charge. Display a summary of the order in a text area along with the total cost. Provide buttons which places the order and clears the order. Allow for multiple pizzas to orders Submit as...

  • User interfaces are a critical part of any system. In this lesson, a Graphical User Interface...

    User interfaces are a critical part of any system. In this lesson, a Graphical User Interface (GUI) is created. The code generated will link the components to the action. Assignment: Create a Graphical User Interface that has two buttons and a textArea (See Examples 12.3 and Example 12.4). figure 1 Create a String array to store the following messages (Enter your name where it says YourName). "Congratulations YourName!nYou completed the Java class. nYou learned to write Java programs with commonly...

  • In Chapter 2 you learned how to create TOE charts and design forms and use text...

    In Chapter 2 you learned how to create TOE charts and design forms and use text boxes and buttons. You also learned about dialog boxes, access keys, tab order, container controls, and splash screens. Design principles and Windows standards were emphasized. Discuss the pros and cons of what comes first and why: programming or the design? The book is Programming with Microsoft Visual Basic 2017

  • Exercise 1 1. Create a simple Graphical User Interface (GUI): Create new JFrameForm and use the...

    Exercise 1 1. Create a simple Graphical User Interface (GUI): Create new JFrameForm and use the Palette to drag and drop the Swing Containers and Controllers like the figure shown. Your Form should accept number in its text field as Month. When the user press GO Button, the corresponding Month Name has to be displayed in the Label, otherwise, the Label text has to indicate that the number entered is invalid Convert month number to month name: W Gom The...

  • Subject: Advance application development Visual studio exercise The project is to create a simple Notepad style Tex...

    Subject: Advance application development Visual studio exercise The project is to create a simple Notepad style Text Editor. This will demonstrate the C# language basics. user interface controls and how to handle user events. Controls can be found in the Toolbox pane in its default location on the left side of the IDE, with the Control Properties pane on the right side of the IDE. Include the items on the following list in the program Create a C# Windows Forms...

  • JAVA Create a simple Graphical User Interface (GUI) in java with the following requirements:  The...

    JAVA Create a simple Graphical User Interface (GUI) in java with the following requirements:  The interface components will appear centered in the interface, and in two rows. o Row one will have a Label that reads “Please enter a valid integer:” and a Text Field to take in the integer from the user. o Row two will have a Button that when pressed converts the integer to binary  The conversion will be completed using recursion – A separate...

  • The questions below deal with Microsoft Visual Studio 2012 Reloaded, under the Visual Basic programming language....

    The questions below deal with Microsoft Visual Studio 2012 Reloaded, under the Visual Basic programming language. The book ISBN number that I am using is: 978-1-285-08416-9 or the UPC code is: 2-901285084168-1. Question 1 Visual Basic 2012 is an object-oriented programming language, which is a language that allows the programmer to use ____________________ to accomplish a program�s goal. Question 2 An application that has a Web user interface and runs on a server is called a(n) ____________________ application. Question 3...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT