here is the code I put in the keypress of my form to exit if I press the ESC key
LPARAMETERS nKeyCode, nShiftAltCtrl
If Empty(nKeyCode)
Return
EndIf
If nKeyCode = 27
Release thisform
Return
EndIf
I was sure I have set the keypreview property of the form to .T. but I hadn't !!!
So I imagine it is not necessary :-) I did it last year so i don't remember exactly but I don't want to mix you up more than you'll probably are :-))
Anyway this property works for the keypress events,
if it is set to .t. the form intercepts the keypress events before the activecontrol does on the contrary the form does not intercept the keypress event.
About other events, such as doubleclick, I don't think you can prevent you from putting code in each control which behaves to your grid.