Hi Michel,
Can you use the CreateMutex() technique suggested by Peter Stephens to keep track of the applications running? I use it instead of FindWindow(), etc. because I modify the Window title on the fly. Don't know if this will help for your scenario, but just a thought.
Bill
>I grab this sample in order to detect if an application is already running by checking at the window's title.
>
>FUNCTION CheckWin
>* Routine which sees if an application is active by looking for its
>* Window title
>* expC1 Window title
>PARAMETER tcTitle
>DECLARE INTEGER FindWindow in Win32API as FindWindow STRING, STRING
>RETURN IIF(FindWindow(0,tcTitle)>0,.T.,.F.)
>
>However, this is not good. I would like to detect for the task name instead.
>
>Anyone has an idea?
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.