I located the code that uses the WaitForSingleObject. I incorporated this into my application and it works fine for starting the shell. However, I need to be able to start my shell, let control go back to my VB app, and then at a later time go back to the shell and close it. My problem is when I want to go back to the shell and close it, I can't get the VB application to relenquish control and let the shell commands (Sendkeys) execute. These shell commands are supposed to close the Shell app but they seem to bog down when they are competing with the VB app for resources. Opening the shell application isn't a problem but coming back to it later to close it is.
Thanks for any help you can provide.