Question: In this exercise, you will learn about a forms CancelButton property, which specifies the button whose Click event procedure is processed when the user presses

In this exercise, you will learn about a form’s CancelButton property, which specifies the button whose Click event procedure is processed when the user presses the Esc key. Open the VB2015\Chap03\Cancel Solution\Cancel Solution (Cancel Solution.sln) file.

a. Open the Code Editor window and review the existing code. Start the application. Type your first name in the text box and then press Enter to select the Clear button, which is the form’s default button. The Clear button removes your name from the text box. Click the Undo button. Your name reappears in the text box. Click the Exit button.

b. Return to the designer window. Set the form,s CancelButton property to btnUndo. Doing this tells the computer to process the btnUndo_Click procedure when the user presses the Esc key. Save the solution and then start the application. Type your first name in the text box and then press Enter to select the Clear button. Press Esc to select the Undo button. Your name reappears in the text box.

Step by Step Solution

3.31 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

ab Microsoft Visual Studio Solution File Format Version 1200 Visual Studio 14 VisualStudioVersion 140225120 MinimumVisualStudioVersion 100402191 ProjectF184B08FC81C45F6A57F5ABD9991F28F Cancel Project ... View full answer

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 Programming with Microsoft Visual Basic 2015 Questions!