I agree with Richard Ainsley. Nasty problem. One of the possible
causes is circular reference: your form cannot unload because another
form (or object) keeps a reference to a component in that form.
Also keep in mind that setting an object to nothing does not release
the object, just decreases its reference count. The object is
released when the reference count goes to zero.
I had a similar problem, the main form disappeared hitting the X
button but the application was still running. The problem was
not in the main form, but in one of the external components that
was not releasing all its resources.
Good luck,
Marco