Bob,
"Clear Events" is needed at an exit point, otherwise you're trapped in app. Typical place is menu "exit".
In fox2x there weren't "read events" but instead we use "read valid".
Your application(s) might work without a single 'read events' if the code provides some sort of modality (ie: In fox2x and later an application built on browse only doesn't need it because 'browse' provides a modal state-assuming it doesn't have nowait clause).
ie: This would work w/o 'read events'
do form myModalForm
messagebox('Exiting VFP')
A single form application (form is not modal this time)
do form myForm
read events && Needed this time
* Below code runs when 'clear events' is executed
messagebox('Exiting VFP')
*MyForm.Unload
clear events
You can see this behavior directly in IDE:
oForm = createobject('myForm')
oForm.Show
define class myForm as Form
Procedure QueryUnload
Clear Events
endproc
enddefine
If you run this code you don't see a form on screen. Add 'read events' after oForm.Show and it stays on screen.
Cetin
>Cetin,
>
>I put the read events and clear events in as suggested. No Change. A process is however fired off and appears in the Task Manager. It has to be killed manually because the "CLEAR EVEVTS" is in the application that never runs.
>
>NOTE: I have 71 applications compiled as executables here of 2.6 6.0 (but mostly 7.0 and 9.0) versions. I have never included the READ EVENTS code in any of the other 7.0 and 9.0 apps. Those executables are run every day by numerous users.
>
>Any other ideas.
>
>Kindest regards,
>Bob Pahus