I've got an app where I need to be able to shutdown the program via a button on a form then start up another program. The code looks like:
goApp.OnShutDown()
ShellExec(lcApp, "open", "Z", lcAppPath)
The ShellExec works fine, but I get an "Object does not exist" error when using the OnShutDown() call. I'm assuming that's because of the shutdown order (ie. an object the form is depending on is released before the form is). Is there some other way I should be handling this?