>
>I have an app that starts another program using ShellExecute() api. The other app runs minimized and performs some work and my app waits for it to finish. When the other program finishes, however, my app is not the foremost window. It is visible but it is not the foremost window. I tried using SetForegroundWindow( _VFP.hWnd ) api but this just makes my app flash on the Windows taskbar but does not make my window the foremost active window. Any suggestions?>
>Jos,
>
>I recall having a similar situation when I needed to force a new e-mail message window to be in the foreground. The solution I found was to first call the BringWindowToTop() API function, passing the handle of the window in question. Then, I called ShowWindow(), passing the handle and the state (1 for normal).
>
>Hope that helps.
>
>Laterness,
>Jon
Hmm, let me try that then.
UPDATE. It seems to work, but the problem with Excel image keeping on the screen after closing remains.
If it's not broken, fix it until it is.
My Blog