Udostępnij za pośrednictwem


Adding an Entry to an Accelerator Table

To add an entry to an accelerator table

  1. Open the accelerator table by double-clicking its icon in Resource View.

    Note

    If your project doesn't already contain an .rc file, please see Creating a New Resource Script File.

  2. Right-click within the accelerator table and choose New Accelerator from the shortcut menu, or click on the empty row entry at the bottom of the table.

  3. Select an ID from the drop-down list in the ID box or type a new ID in the ID box.

  4. Type the Key you want to use as an accelerator or right-click and choose Next Key Typed from the shortcut menu to set a key combination (the Next Key Typed command is also available from the Edit menu).

  5. Change the Modifier and Type, if necessary.

  6. Press ENTER.

    Note

    Make sure all accelerators you define are unique. You can have several key combinations assigned to the same ID with no ill effect, for example, CTRL + P and F8 can both be assigned to ID_PRINT. However, having a key combination assigned to more than one ID will not work well, for example, CTRL + Z assigned to both ID_SPELL_CHECK and ID_THESAURUS.

For information on adding resources to managed projects, please see Resources in Applications in the .NET Framework Developer's Guide. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resources strings to properties, see Walkthrough: Localizing Windows Forms and Walkthrough: Using Resources for Localization with ASP.NET.

Requirements

Win32

See Also

Reference

Editing Accelerator Tables

Accelerator Editor