>Hi Pablo,
>
>I've read this discussion up to this message. We also have graphic toolbar. I advised my colleagues several times to use Menu on the Fly, e.g., when your form appears, the menu navigate appears too and allows to use all necessary hot keys. IMO, it's very good idea, but for my deepest regret, we still have so many others things to do, that this idea is still not implemented. Anyway, tell me, if this idea will work for you...
>
Yes, thanks to the replys works fine, for me it's very easy to implement. I explain:
I have a form baseclass for all my forms, in this class I put keypreview = .T. for handling all the key events before the controls events. In the keypress of this baseclass I put:
LPARAMETERS nKeyCode, nShiftAltCtrl
DO CASE
* CTRL + Home && First Record
CASE nKeycode = 29 AND nshiftaltctrl = 2
IF VARTYPE(oToolBar)="O" AND oToolBar.First.enabled = .T.
oToolBar.First.Click()
ENDIF
NODEFAULT
* CTRL + PagUp && Previous
CASE nKeycode = 31 AND nshiftaltctrl = 2
IF VARTYPE(oToolBar)="O" AND oToolBar.Previous.enabled = .T.
oToolBar.Previous.Click()
ENDIF
NODEFAULT
.
.
.
* CTRL + N && New Record
CASE nKeycode = 14 AND nshiftaltctrl = 2
IF VARTYPE(oToolBar)="O" AND oToolBar.New.enabled = .T.
oToolBar.New.Click()
ENDIF
NODEFAULT
.
.
.
ENDCASE
Note that I check if the toolbar exists (cause can have some modal forms or forms I wouldn't like to allow access the toolbar), and if the button is enabled, if you get another key, this will go to the control.
Works very good, at last.
Regards,