That's correct, I was meaning with NODEFAULT combined with property or something to let the form close in some circunstancy like pressed some Close Button :-D
May be it was to late and no time to do an better sample to improve my Fast & Dirty workaround (more dirty than anythingelse) :-D
>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 Service Pack 1 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