Board index » delphi » Killing off a window created when executing an external program

Killing off a window created when executing an external program

Hi,

Can anybody tell me how I can kill off a window which has been made when
I have run an external program (in D2.)  Ie. I use the ShellExecute
command, but when the program has finished I get a window with the title
"Finished - <program name>".  How can I make this window dissapear when
I have finished, or, even better, make it so that it never appears in
the first place?

Any help appreiciated.

Kind Regards
Luke Kenny

--
=======================================
Luke Kenny - l...@netspace.net.au
Phone - Within Australia - 019-387-685
      - International - +61-19-387-685
=======================================

 

Re:Killing off a window created when executing an external program


Luke,

Here are a few ways to do this:
1. Define a pif file (shortcut) for the app you are running, and set 'close on exit' in its properties.
2. Exec a batch file which has exit as its last line.
3. get a handle to the running app, get a process handle, then kill the process.

Good luck!

Other Threads