>In the keypress of the form. The keypreview property is on because we want to trap certain keypresses, (such as SF5)
>
>On the form there are a number of text boxes that are added dynamically at run time (about 50), all of possibly different classes, which is decided at run=time based on entries from a DBF.
>
>Where else other than a keypress event can you determine keypresses.
Could ON KEY LABEL do work for you?
IOW, In Form Init:
this.cOnShiftF5=on('key','shift+f5')
on key label shift+f5 do something.prg
in form.destroy:
local lcOnShiftF5
lcOnShiftF5=this.cOnShiftF5
on key label shift+f5 &lcOldShiftF5
If it's not broken, fix it until it is.
My Blog