Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP9 on Win2000 or Win XP .app runs, .exe don't
Message
From
21/09/2005 10:13:08
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01051345
Message ID:
01051633
Views:
9
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
* Below code runs when modal form is hidden or released
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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform