Provide Keyboard Access to Controls
As on menus, controls on dialog boxes can have accelerator keys that allow you to move from control to control by typing rather than using the mouse. On dialogs however, accelerator keys are closely associated with tab order.
Tab order is the order in which controls receive focus as the user presses the Tab or Enter key. That order is determined by two control properties:
TabIndexdetermines the location of the control in the tab order.TabStopdetermines whether or not the control is included in the tab order.
Accelerator keys are set by specifying a letter from a control’s Caption in its Accelerator property. If a control doesn’t have a Caption property, create a label with an accelerator key and set that label’s TabIndex to be just before the target control’s TabIndex, as shown in Figure 20-14.

Figure 20-14. Using a label to provide an accelerator key for a text box
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access