Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 5, Problem 15RQ
Program Description Answer
To add items to a list box control, the Add method must be used.
Hence, the correct answer is option “A”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Adding Students to a Club Create an application that displays a list of student names in a ListBox. Use a second empty ListBox to represent the members of a student club. Use a button labeled Addto copy member names from the general list to the club list. Use a button labeled Remove to remove a student from the club list. Keep a running count of the number of names in the club list. The application should perform the following error-checking:• Do not permit the same person’s name to be added twice.• Avoid throwing an exception if the user clicks the Add button before having selected a student name.• Avoid a runtime error if the user clicks the Remove selected member button, without having selected a member name
In "Starting out with visual basic 8th edition programming challenge 5"
Which event occurs when the user either types a value in the text portion of a combo box or selects a different item in the list portion? a. ChangedItem b. ChangedValue c. SelectedItemChanged d. TextChanged
Create a list that contains 10 words and their descriptions. Your task is to have the application randomly select a word from the list and display the description to the user. User will then try to guess the word based on the clue displayed. One round of game is five chances. Once the total number of chances becomes zero, the program should prompt the user whether to keep playing or exit the application.
Chapter 5 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 5 - Rewrite the Loop clause from Question 1 using the...Ch. 5 - Prob. 2MQ3Ch. 5 - Write a For clause that repeats the loop body...Ch. 5 - Write an Add method that adds the contents of the...Ch. 5 - Prob. 2MQ6Ch. 5 - Which of the following clauses will stop the loop...Ch. 5 - Which of the following statements can be used to...Ch. 5 - Prob. 3RQCh. 5 - Prob. 4RQCh. 5 - Prob. 5RQ
Knowledge Booster
Similar questions
- Assume nameListBox is a ListBox control. Write code that reads the selected item from the ListBox. Be sure to prevent an exception from occurring in case no item has been selected.arrow_forwardThe code to delete the selected name from the listbox ( IstBxNames) is: My ListBox Add New Name Ahmad Ali Anas Add Name Dina Maher Moham Sameer Delete Name Clear Result Wafaa Resulto الكود لشطب الاسم الذي اختاره المستخدم من قائمة الأسماء Select one: O a. IstBxNames.ltems.Remove(IstBxNames.Text); O b. IstBxNames.ltems.Remove(txtBxName.Text); O c. None of These O d. IstBxNames.Delete(txtBxName.Text);arrow_forwardHow would you write the code in Visual Basic to create a list box and a button for Add, user can add items to the listarrow_forward
- 5 Dim ar(1, 2) As Integer Dim result As Integer = 0 For i = 0 To ar.GetUpperBound(0) For j = 0 To ar.GetUpperBound (1) ar(i, j) = ListBox1.Items (i + j) If ar(i, j) Mod 2 = 0 0r ar(i, j) Mod 3 = 0 Then 4 9. 10 5 7 result += 1 End If Next Next Button1 MsgBox(result) listBox1 Enter your answerarrow_forwardWhich of the following expressions would you use to get the value of the item that’s selected in a list box named lstMonth? lstMonth.Items.Selected lstMonth.Items.Selected.Value lstMonth.Selected.Value lstMonth.SelectedValuearrow_forwardWhen a user enters a value in the text part of a combo box or chooses a different item from the list portion, what happens?arrow_forward
- Celsius to Fahrenheit TableAssuming that C is a Celsius temperature, the following formula converts the temperatureto a Fahrenheit temperature (F):F =9/5C + 32Create an application that displays a table of the Celsius temperatures 0–20 andtheir Fahrenheit equivalents. The application should use a loop to display the temperaturesin a list box.arrow_forwardThe foreach loop is designed to work with a temporary, read-only variable that is known as the __________.a. element variableb. loop variablec. index variabled. iteration variablearrow_forwardC- Answer with True or False (4 only) 1- The "List..AddItem (i)" is used to add an item into the list tool. 2- Abs(x) is short for absolute of x. 3- There are two Methods of input (Msgbox, Command button). 4- In visual basic programming, String is used to declaring letter. 5- The "Forecolor" property is used to change the background of the text tool.arrow_forward
- Create a Name Generator using python programing 2. Create 3 lists for first name, middle name, and last name with 10 items per list 3. The application will ask the user to generate a new name. 4. If yes, use a random number between 0 - 9 to randomly select items in the lists 5. Display the generated name “Congratulations! Your new name is ________” 6. If No, display the word “Thank you! ” and display all the names that user-generated.arrow_forwardBrowse the web to locate the lyrics to the song “The Twelve Days of Christmas.” The song contains a list of gifts received for the holiday. The list is collective so that as each “day” passes, a new verse contains all the words of the previous verse, plus a new item. Write an application that displays the words to the song starting with any day the user enters. (Hint: Use a switch statement with cases in descending day order and without any break statements so that the lyrics for any day repeat all the lyrics for previous days.)arrow_forwardWrite an Add method that adds the contents of the decPrice variable to the lstPrices control.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT