Question: In this exercise, you learn how to use a text boxs CharacterCasing property. Open the VB2015Chap04CharCase SolutionCharCase Solution (CharCase Solution.sln) file. a. Open the Code
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.
Step by Step Solution
3.44 Rating (160 Votes )
There are 3 Steps involved in it
ab Microsoft Visual Studio Solution File Format Version 1200 Visual Studio 14 VisualStudioVersion 140225120 MinimumVisualStudioVersion 100402191 ProjectF184B08FC81C45F6A57F5ABD9991F28F CharCase Projec... View full answer
Get step-by-step solutions from verified subject matter experts
