Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Access Keys
◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Access Keys
■ Access keys give the user quick keyboard access to a menu, menu command,
or control. Unlike shortcut keys, access keys do not execute commands when
pressed. At design time, you designate a letter in the menu or command
caption to be the access key. At run time, this letter is highlighted (or
underlined), and the user can access the menu or command by pressing Alt+
the letter.
■ Access keys are assigned to menu items through the Menu Design window. To
assign an access key to a menu item, type an ampersand (&) in the menu's
caption immediately preceding the character you want as the access key.
When the user presses Alt+ the letter, a Click event for that menu item is
generated. See: ◄Click Event► ◄Creating a Menu► ◄Menu Design Window►
■ To assign an access key to a control, include an ampersand (&) in the
control's caption immediately preceding the character you want to appear
highlighted or underlined at run time. For example, if you type "&Add,"
the caption appears with the "A" highlighted (Add), and the key
combination is Alt+A. See: ◄Caption Property►
■ If you specify an access key for a frame or label and then press that
access key, the focus moves to the next control in the tab order that can
receive the focus. See: ◄Tab Order Definition►