Terminating applications

Close current Delphi application:

Run an application, wait for it to finish, then destroy it:

Kill All Applications:

My method to close a particular named application:

Close an external application using WM_CLOSE: