Open the Numbers Solution.sln file contained in the VB2017Chap05Numbers Solution folder. The application allows the user to
Question:
Open the Numbers Solution.sln file contained in the VB2017\Chap05\Numbers Solution folder. The application allows the user to display a list of numbers in a list box. The user will enter the start and end values for these numbers in the two text boxes.
a. Open the Code Editor window. Locate the btnForNext_Click procedure and then click the blank line above its End Sub clause. Use the For…Next statement to display the range of numbers indicated by the user. For example, if the user enters the numbers 1 and 5 in the From and To boxes, respectively, the statement should display the numbers 1 through 5 in the list box. Display the numbers only when the value in the From box is less than the value in the To box; otherwise, leave the list box empty. Save the solution and then start and test the procedure.
b. Now, locate the btnDoPretest_Click procedure and then click the blank line above its End Sub clause. Use a pretest Do…Loop statement to display the range of numbers indicated by the user. Display the numbers only when the value in the From box is less than the value in the To box; otherwise, leave the list box empty. Save the solution and then start and test the procedure.
c. Finally, locate the btnDoPosttest_Click procedure and then click the blank line above its End Sub clause. Use a posttest Do…Loop statement to display the range of numbers indicated by the user. Display the numbers only when the value in the From box is less than the value in the To box; otherwise, leave the list box empty. Save the solution and then start and test the procedure.
Step by Step Answer: