Hi Bill,
>I can get around this by only allowing the "master" app to "Exit All", but I'm not well versed in Windows processes architecture and I would like to understand what is happening here. When ShellExecute() is executed, does the "master" application process "own" the started processes or something like that? Thus causing a "loop" of a process trying to shut itself down thru another process? If not, then what is happening?
While I don't have an idea, what's happening, why don't you try a different approach. Any application should know whether it's the master application, or a second instance. If the user selects "Exit all" in a child application send a message to the parent instance. I don't know much about VB, but I think you can intercept windows messages. If not send the message that selects the "Exit all" menu item in the master application. When the master application receives this message, it closes down all applications including the one that requested the shut down and terminates itself.
BTW, SendMessage() waits for the result from the destination application. This might cause problems here, so try PostMessage() instead.
Christof
--
Christof