>Hi Jim,
>
>I just built this small application for a test.
>
>* TIME.PRG
>*-------------------------------------------
>ON SHUTDOWN CLEAR EVENTS
>clear windows all
>SET CURSOR ON
>DO FORM TIME
>READ EVENTS
>ON SHUTDOWN
>
My guess is that you're disabling the VFP _SCREEN context via something like SCREEN=OFF in CONFIG.FPW or setting _SCREEN.VISIBLE=.f., and the offending form is created in the VFP default IN SCREEN context (the Form's ShowWindow property is 0) - you need to make it a Top-Level form (ShowWindow=2) if it needs to be active and visible with VFP's screen disabled, and any child forms show have a ShowWindow value of 1 (In Top-Level Window).
>Again, it works just fine as an .APP but not as an .EXE
>
>There is also a CLEAR EVENTS into the Quit button of the form.
>It act just like the READ EVENTS is not there. I can see the form appearing a fraction of a second and disapear.
>
>Does it has something to do with the compilation process - Win32 executable/COM server (exe) - or can it be a bug or shoud I have to change something in the form???
>
>Réal
>
>========================================================
>>>I have a very small application in VFP 6 SP4 that works fine as an .APP but just flashes (does not stop - just goes throught) as an executable .EXE
>>>
>>>How come?
>>
>>The "typical" stratup for a VFP app usually goes something like this:
>>
>>SET TALK OFF
>>[... more SETs here]
>>
>>DO MENU.MPR
>>
>>READ EVENTS
>>*(Read Events will process all of the events that occur in VFP like Click, Valid, etc) Use a CLEAR EVENTS to tell the READ EVENTS to stop processing events and continue to the next line of code after the READ EVENTS. Typically your CLEAR EVENTS will go behind the File|Exit menu option or in the ExitApp method of an application object.
>>
>>* Maybe log the app shutting down or something here.
>>
>>
>>
>>Hope this helps!