Hide Other Application

Hello,

I was wondering if there is any way to hide a window of an application and
then return it to normal after an array of commands have been executed?

For example, Notepad is running, Delphi somehow "hides" (completely removes
the program from the task bar) and then reappears after the program has
performed an operation.

I am currently trying to hide AutoCAD as a user may cancel a script from
executing, I am of course using DDE. Any hints or suggestions would greatly
appreciated.

Thanks!

Trevor