Create short keyboard shortcuts for toolbar controls in VB6

In my VB6 project, I only use the Control Panel Control, mainly MDI From (Not menubar). The toolbar has large images that indicate actions such as New, Save, View, Help, etc. I wanted to know if there is any way to create shortcuts for these actions. As far as I know, the properties of the MS Windows Common Controls 6.0 control panel do not show any relative possibility for this. Since the MDI form does not have any key events, I cannot create short abbreviations by binding keys. I do not need a menu bar in my form, since it has very few elements, so only the toolbar works. Please suggest any idea to have short abbreviations for toolbar buttons ......: - | Thanks in advance.............

+4
source share
2 answers

One way is to use the local WH_KEYBOARD hook, this article explains how (and provides a library).

0
source

Add a key event to your form. You can then handle the short cuts by specifying the same functions that would be called in the mouse down event for the menu bar.

For example, you might have something like

 public sub SaveItem_Clicked() DoSave() end sub 

Then in your test press Alt + S, etc. and call DoSave ()

0
source

All Articles