I'm having a hard time figuring out how to close the pop-up thread. I just want to leave it in the While loop watching for pop-ups until the main program finishes. When the main program returns the console window is left up. When I don't start the thread for clicking off pop-ups, when the test finishes the console goes away, so I'm pretty sure that the pop-up thread is somehow causing the console to say up, and that I should be closing the thread by breaking out of the While loop somehow.
BTW, I loved your blog and sample on handling dialog and pop up windows. I just need to get it working without a hitch.
Tom