
Using Shortcut Keys in Toolbar Control
The toolbar control (at least the VB incarnation) does not do accelerator
translation like the menus do. What most apps do is setup toolbar commands
that duplicate the functionality on the menus, and translate a toolbar
click into a menu click. Of course, if you don't want to have menus on the
form, you'll have to "fake" the accelerators by setting up a key mapping
routine that responds to the form's KeyDown and KeyUp events (make sure
the KeyPreview property of the form is set to true).
As for Outlook and standards, IMO the point is moot, because Outlook's
menus are not menus and the toolbars are not toolbars (in the sense that
we are used to, i.e., the common controls and VB's standard menus).
Rather, the new Office "CommandBars" are a mix between a menu and a rebar.
The jury is out on whether users feel comfortable with them, though.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please post/reply to the newsgroup(s) so
that everyone can benefit from the discussion.
Regards,
Klaus H. Probst, MCP
ICQ: 22454937
The VB Box: http://members.xoom.com/kprobst/
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quote:
> Does anyone know how to make the shortcut keys work on the Toolbar
control?
> I have a toolbar button with the Caption set to &New, but Alt-N does not
> execute the code.
> Thanks!