I am writing a program and I need to have a secondary invisible program running that checks that the first program continues running and when it doesn't, then I need to figure out how to make the invisible program keep tabs on the first program so it can respawn it in the same state as it ended in, I also need to allow the first program to be able to exit when it needs to without the second respawing it, I have 4 questions

1) How do I check to see if the first program is still running (and is there any way to do it without using a timer, if not I still need to know)?

2) How do I check to see wether certain command buttons are enabled or not in the first program using the second?

3) How do I let the second program know that when the first program ends correctly (a command button on the form) that it should respawn the first program?

4) I have heard something about needing to know classes and child windows, but I have no clue what they are talking about, do I need this information about my first program, and if so, how do I get it?

Thank you very much!