In this exercise, you learn how to use a text boxs CharacterCasing property. Open the VB2015Chap04CharCase SolutionCharCase

Question:

In this exercise, you learn how to use a text box’s CharacterCasing property. Open the VB2015\Chap04\CharCase Solution\CharCase Solution (CharCase Solution.sln) file.

a. Open the Code Editor window and study the code contained in the btnDisplay_Click procedure. The code compares the contents of the txtId control with the strings “AB12”, “XY59”, and “TV45”. However, it does not convert the contents of the text box to uppercase. Start the application. Enter ab12 as the ID and then click the Display button. The button’s Click event procedure displays the “Invalid ID” message, which is incorrect. Click the Exit button.

b. Use the Properties window to change the txtId control’s CharacterCasing property to Upper. Save the solution and then start the application. Enter ab12 as the ID. Notice that the letters appear in uppercase in the text box. Click the Display button. The button’s Click event procedure displays the “Valid ID” message, which is correct. Click the Exit button.

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

Step by Step Answer:

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