Hi Andrus,
You must redefine KeyUp event of OLE Control, because this controls has higher priority.
MartinJ
>I preview drill-down reports in VFP form containing WebBrowser ActiveX control as described in Doug Hennig FoxTalk article in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxtk05/html/ft05c11.asp?frame=true>
>However, pressing Esc key does not close the preview window. I set forms keypreview propery to .T. and added the following code to form keypress event but this does not work. Any idea ?
>
>
LPARAMETERS nKeyCode, nShiftAltCtrl
>
>if m.nShiftAltCtrl=0 and m.nKeyCode = 27
> if thisform.queryunload()
> thisform.release()
> ENDIF
> nodefault
> return
>endif