This did not help.
I have even tried, from the command line, after closing the form, RELEASE < formname > and the APP was still in use. CLEAR ALL seems to be the only way to make it go away.
Maybe if I move all the startup code from the main prg into the load method of the form and make the form as main in the project. Worth a try.
UPDATE:
I have tried this method and it does not work either. I am going to give up on this, it is not imperative. It may be something in the form that is remaining open, I have no idea. I don't have time to look into this any further.
Thanks for all your help.
David