Now that we have access keys set up, we will now put them to use. The command button's access keys work just fine, but labels are not very responsive tools. However, the access keys on the labels enable the user to press and hold Alt + the labels access key, which jumps to the next active object. In this case, the text boxes. In order to get this to work properly, we need to set up a tab index, which determines the sequence that the form objects will have focus. Focus is simply what an object has in order for the user to interact with the application through that object. With that said:
|
|
We need to set the startup form. When multiple forms are part of a project, the startup form is usually the form that the project starts with.
Right-click the project name in the Solution Explorer window and select Properties. (if the Solution Explorer window is not present, select the menu View > Solution Explorer, or just press Ctrl + Alt + L on the keyboard).
In the drop-down box under the label Startup form:, select frmCarpentry.
Click the X to the left of the Solution Explorer window (closes Project Properties window).
If you run the application, you notice that you can tab through only the text boxes and command buttons. Remember: You can press Alt + the access key to give the focus to a command button or text box. The text box's access key is the underlined letter in the label to the left of it.
Now its about time we get this thing working! Go on to Page 6 to learn how.