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 18RQ
Program Description Answer
To select the fourth item from the list box 1stNames, the statement 1stNames.SelectedIndex = 3 is used.
Hence, the correct answer is option “C”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Which 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.SelectedValue
USe Form CS Create an application consists of 1 form with 30 controls:
1 Textbox
3 Radio buttons
2 Buttons
5 Checkboxes
Code must be written to respond to the user clicking on the buttons, radio
buttons and check boxes.
Project requirements:
1. when the application starts the focus must be at the flavor selection list
with the first flavor selected, one scoop selected and no toppings
selected and the correct total displayed
2. when the "Exit" button is clicked, the application ends
3. the total will be computed and displayed when the user makes a scoop
selection and/or toppings selection.
4. when the "Clear" button is clicked, the textbox is cleared. Focus goes to
the listbox.. The first flavor is selected, one scoop is selected and no
toppings are selected and the correct total is displayed
5. the total dollar amount must be formatted as currency
6. allow multiple flavors to be selected
7. the
otal will
times be
an
eflect the
ber of scoops
and toppings as they are selected
In row order form, the ____.
first row is stored first
first row is stored last
first column is stored first
first column is stored last
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
- ListBox controls have an __________ method that erases all the items in the Items property. a. Items.Erase b. Items.Remove c. Items.Clear d. Items.Emptyarrow_forwardThe syntax of a statement that invokes (calls) an independent Sub procedure is ____. a. procedureName([argumentList], dataType) b. procedureName([argumentList]) c. procedureName([argumentList]) As dataType d. procedureName{[parameterList]}arrow_forwardFor closing a form the code can be Select one: a. Me.Close b. Form.exit c. Form.close d. Me.exit Clear my choicearrow_forward
- In this exercise, you modify the Grade Calculator application from this chapter’s Apply lesson. Use Windows to make a copy of the Grade Solution folder. Rename the copy Grade Solution-Intermediate. Open the Grade Solution.sln file contained in the Grade Solution-Intermediate folder. Open the CourseGrade.vb file. The DetermineGrade method should accept an integer that represents the total number of points that can be earned in the course. (Currently, the total number of points is 200: 100 points per test.) For an A grade, the student must earn at least 90% of the total points. For a B, C, and D grade, the student must earn at least 80%, 70%, and 60%, respectively. If the student earns less than 60% of the total points, the grade is F. Make the appropriate modifications to the DetermineGrade method and then save the solution. Unlock the controls on the form. Add a label control and a text box to the form. Change the label control’s Text property to “&Maximum points:” (without the quotation marks). Change the text box’s name to txtMax. Lock the controls and then reset the tab order. Open the form’s Code Editor window. The txtMax control should accept only numbers and the Backspace key. Code the appropriate procedure. The grade should be cleared when the user makes a change to the contents of the txtMax control. Code the appropriate procedure. Modify the frmMain_Load procedure so that each list box displays numbers from 0 through 200. Locate the btnDisplay_Click procedure. If the txtMax control does not contain a value, display an appropriate message. The maximum number allowed in the txtMax control should be 400; if the control contains a number that is more than 400, display an appropriate message. The statement that calculates the grade should pass the maximum number of points to the studentGrade object’s DetermineGrade method. Make the necessary modifications to the procedure. Save the solution and then start and test the application.arrow_forwardThe Donut Shoppe sells four varieties of doughnuts: Glazed (1.05), Sugar (1.05), Chocolate (1.25), and Filled (1.50). It also sells regular coffee (1.50) and cappuccino (2.75). The store manager wants you to create an application that displays a customers subtotal, 6% sales tax, and total due. Create a Windows Forms application. Use the following names for the project and solution, respectively: Donut Project and Donut Solution. Save the application in the VB2017\Chap06 folder. Create the interface shown in Figure 6-57. When coding the application, use one independent Sub procedure to determine the subtotal, which is the total cost without the sales tax. Use a function to determine the sales tax. Use an event-handling Sub procedure to clear the output. Save the solution and then start and test the application.arrow_forwardThe purpose of this exercise is to demonstrate the importance of testing an application thoroughly. Open the FixIt Solution.sln file contained in the VB2017\Chap04\FixIt Solution folder. The application displays a shipping charge that is based on the total price entered by the user, as shown in Figure 4-64. Start the application and then test it by clicking the Display shipping button. Notice that the Shipping charge box contains $13, which is not correct. Now, test the application using the following total prices: 100, 501, 1500, 500.75, 30, 1000.33, and 2000. Here too, notice that the application does not always display the correct shipping charge. (More specifically, the shipping charge for two of the seven total prices is incorrect.) Open the Code Editor window and correct the errors in the code. Save the solution and then start and test the application.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning