HotKey Designer
In the Windows operating system, hotkeys refer to keyboard shortcuts
that can be used to directly access controls in the user interface.
To use a hotkey for a specific control in Visual Basic you simply
have to insert the & (ampersand) character in front of a letter
in its Text or Caption properties and the control will be easily accessible
at runtime (that is, from a focusing point of view) by pressing 'Alt' and
the designated letter on the keyboard.
However, managing hotkeys on a complex designer is not an easy
task, considering a set of simple facts that usually apply in most situations.
On one side all suitable controls should have hotkeys defined, and on the
other side there should not be two controls having the same hotkey (on that
same designer). The CodeSMART HotKey Designer can be used to automatically
manage control hotkeys, by offering a hotkey generation mechanism
along with the possibility to preserve (lock) some already defined hotkeys.
To generate hotkeys using the HotKey Designer:
-
Open a designer in Design view.
-
Select two or more controls for which you want to generate hotkeys
or select none in order to load all controls.
-
Click the HotKey Designer button on the Designer Tools
toolbar, or select the same entry in the CodeSMART main menu in order to
display the HotKey Designer (quick
toolbar and
menu references are available).
-
Check the corresponding Ignore check boxes for controls that should not be considered
in the generation algorithm (this should be set for all controls that either do not support a hotkey
to be set or should not have one, like for example labels that do not directly correspond to a
focusable control).
-
Check the corresponding Locked check boxes for controls you want to be considered in
the generation algorithm with the already existing hotkeys - that is, further hotkeys (for the
remaining controls) will be generated also taking into account these existing ones, which, on
their part, will not be modified.
-
You can automatically lock all controls that have already defined hotkeys,
by checking the corresponding check box.
-
Select from the Operation combo box list the hotkey generation
method. For better hotkey management, you can also choose to remove all
existing hotkeys (for unlocked controls) prior to generation.
-
Press the Generate button in order to generate hotkeys, respectively
the Remove button to remove hotkeys (for unlocked controls). At this
point the results are only previewed - that is, they are not applied to the
designer yet.
-
Click the Apply button in order to apply the newly established hotkey set.
See Also
Back To Top
|