>You need to check if the application is already running before
>launching it again, one easy way to do it; but not the best; is to check
>for the window title of you application with this code:
>
>LOCAL lnWindowHandle
>
>DECLARE INTEGER FindWindow IN WIN32API INTEGER,STRING
>DECLARE INTEGER BringWindowToTop IN WIN32API INTEGER
>
>lnWindowHandle = FindWindow(0,lcMyWindowTitle)
>
>IF lnWwindowHandle > 0 && App is runing bring it forward
> =BringWindowToTop(lnWindowHandle)
>ENDIF
>
>HTH
>
This doesn't seem to work with Excel, which was started by automation. I was using SetForegroundWindow and tried this one - with no avail.
UPDATE. But adding ShowWindow with normal right after seems to help.
If it's not broken, fix it until it is.
My Blog