>Whenever I test this as an EXE it leaves itself active as a "process", discoverable by the fact that a new EXE cannot be built because of a sharing violation. Once I manually stop the process I can build the EXE again.
>
>The question: What do I have to do to make the thing STOP rather than 'continuing' as a "process"?
>
>LATE-BREAKING NEWS: I have just found that commenting the Application.Visible = .F. lets it terminate cleanly (not continuing as a proess).
>
>Question revised: How can I have an application run on the OS desktop (not the VFP desktop) yet have it terminate cleanly?
It didn't quit properly. I'm having that with my VFE app, whenever it gets stuck in the quit process because of an error, and doesn't clean up all the object references in the proper order. As soon as I fix the errors, it stops misbehaving in this manner.
The only solution I know is to
a) make it bug free ;)
b) make sure it exits gracefully and releases all object references
c) specially perform (b) properly if it exits because of an error.
What puzzles me is the difference you observe when app.visible is .t. - and your app object is a form, right? If it needs to be invisible, there are a few tricks to make it invisible while .visible=.t., like setting its size to 10x10 pixels, and its .top to -30 or so.