The form has to be closed eventually. :)
>I've check it, and it seems like a Bug for me too,but... if the problem is the closable property, maybe a NODEFAULT could work.
>
>
>public oForm
>oForm = CREATEOBJECT("myForm")
>oForm.Show()
>DEFINE CLASS myForm as FORM
> KeyPreview = .t.
> Closable = .T.
> PROCEDURE KeyPress
> LPARAMETERS nKeyCode, nShiftAltCtrl
> MESSAGEBOX(nKeyCode)
> ENDPROC
> PROCEDURE QueryUnload
> NODEFAULT
> ENDPROC
>ENDDEF
>
>
>Of course, this is not a complete Workaround, but at least, he could use the F5 key, while SP1 is released.
>
>
>
>If I remember correctly, it's a bug in VFP8. The KeyPress event doesn't fire for F5 if Closable Property of a Form set to .F. I'm unaware about any workarouns.
>
>>>I can't capture F5 on keypress event of a textbox, everything works fine on VFP7. This is the code:
>>>
>>>IF nKeyCode = -4
>>> Do something....
>>>
>>>ENDIF
--sb--