Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Apr : Detect external application minimize/close event

www.cryer.info
Managed Newsgroup Archive

Detect external application minimize/close event

Subject:Detect external application minimize/close event
Posted by:"ahmoy" (ahmoy_l..@gmail.com)
Date:8 Apr 2008 23:04:31 -0700

Hi there,

I need to write a application that need to run an external
application (some sort like window explorer) but with a catch.
My application also need to do 'something' if the external
application is closed/minimized.

Note: i cannot use WinExecAndWait since after running the
external application, my application still can receive input
from the user.

The current 'dirty' way of doing it is to use timer and
constantly check for window status.  the problem with this
approach is CreateProcess will only return me the process handle
not the main window for the created process (btw, can i get the
main window handle immediately after using the process handle
returned by CreateProcess?).

Thanks in advance,
ahmoy

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive