>I have a top level form that runs modal. The vfp window is hiden in the config.fpw with screen = off. My problem is that when a user closes the app by clicking on the "x" in window the shutdown routine is not ran, leaving a copy of the executable behind running in memory.
>
>If a user clicks on a quit button provided in form, on shutdown works properly.
How about a
Clear Events
in the
Unload event of your top-level form? I haven't played with top-level forms for a while, so I'm not sure if it works...
HTH
Sylvain Demers