Question: Coding in VB (Visual Basic) Q1. (Total of 75 Points) a. (5 Points) Create a form that contains the following tools: 1. A textbox named

Coding in VB (Visual Basic)

Q1. (Total of 75 Points)

a. (5 Points) Create a form that contains the following tools:

1. A textbox named txtNumberOfCourses

2. 5 invisible textboxes named: txtCourse1, txtCourse2, etc.

3. Another 5 invisible textboxes named: txtCredits1, txtCredits2, etc.

4. A button with the caption Semester GPA

5. An invisible textbox named txtSemesterGPA

6. A button with the caption Overall GPA

7. An invisible textbox named txtOverallGPA

8. A button with the caption Clear

You may design the form in any way you see fit. However, I recommend placing the first 10 textboxes, from point 2 and 3 above, in two adjacent columns. One column for the courses and one for the credits, because txtCourse1 is associated with txtCredits1, txtCourse2 is associated with txtCredits2, and so on. 2

b. (10 Points) When the user enters the total number of semester courses in the txtNumberOfCourses textbox, the program needs to do the following:

1. Make sure that the data entered was a positive number between 1 and 5. Otherwise, it will show an error message prompting the user to enter a valid number of credits.

2. Based on the number entered in txtNumberOfCourses, the program will automatically show an equivalent number of textboxes. For example, if the user entered 2 in the txtNumberOfCourses textbox, then the form will show 4 textboxes: txtCourse1, txtCredits1, txtCourse2, and txtCredits2. The remining textboxes must stay invisible.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!