In this exercise, you modify the Proper Case application from Exercise 6. If necessary, complete Exercise 6.

Question:

In this exercise, you modify the Proper Case application from Exercise 6. If necessary, complete Exercise 6. Then, use Windows to make a copy of the Proper Case Solution folder. Rename the copy Proper Case Solution-Hyphenated. Open the Proper Case Solution.sln file contained in the Proper Case Solution-Hyphenated folder. Start the application. Type “carol mason-smith” (without the quotes) as the name and then click the Proper case button. The btnProper_Click procedure displays “Carol Mason-smith”. Click the Exit button. Modify the procedure to display hyphenated names in proper case; for example, the procedure should display “Carol Mason-Smith”. Save the solution and then start and test the application. Be sure the application works correctly if the user inadvertently enters “carol mason-” (notice the hyphen at the end of the entry).


Data from Exercise 6.

Open the Proper Case Solution.sln file contained in the VB2017\Chap07\Proper Case Solution folder. The interface provides a text box for entering a person’s first and last names. The btnProper_Click procedure should display the first and last names in the proper case. In other words, the first and last names should begin with an uppercase letter and the remaining letters in each name should be lowercase. If the user enters only one name, display the name in proper case. Be sure the btnProper_Click procedure works correctly if the user inadvertently enters more than one space between the first and last names. After displaying the name, the procedure should send the focus to the txtName control. Code the procedure. Save the solution and then start and test the application. (If the user enters “john smith” as the name, the application should display “John Smith”. If the user enters “carol” followed by three spaces and then “jones”, the application should display “Carol Jones”. If the user enters three spaces followed by “jack” and another three spaces, the application should display “Jack”.)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: