Application Opening and Closeing?

How can I make a application make by me run a tid-bit of code when another application is opened? Also how do you open and close applications? Thanks-everyone that attempts to help.
Read http://www.cplusplus.com/forum/beginner/1988/
Not to sound rude, but what dose that have to do with anything I asked?
Maybe I have not understood your question.:)
Topic archived. No new replies allowed.