Sinna
2007-01-09 14:15:17 UTC
Hi all,
I'm facing a very strange problem on 1 PC in my office:
When I launch a file with ShellExecuteEx it just displays fine. When I
close the application invoked to display the file, and relaunch the
file, the application is started normally (not minimized) but doesn't
get the focus.
The application is launched with vbNormalFocus (SW_SHOWNORMAL as you wish).
Does anyone has a clue?
I already tried to activate the launched app by calling the AppActivate
function but it fails with Error 5. Even introducing an additional
WaitForInputIdle-call (while already set as flag in the
SHELLEXECUTEINFO) doesn't work out.
Using APIs that cope with window handle(s) is not really an option as it
is quite difficult to determine the correct one. This is because
multiple files can be displayed using the same application.
TIA,
Sinna
I'm facing a very strange problem on 1 PC in my office:
When I launch a file with ShellExecuteEx it just displays fine. When I
close the application invoked to display the file, and relaunch the
file, the application is started normally (not minimized) but doesn't
get the focus.
The application is launched with vbNormalFocus (SW_SHOWNORMAL as you wish).
Does anyone has a clue?
I already tried to activate the launched app by calling the AppActivate
function but it fails with Error 5. Even introducing an additional
WaitForInputIdle-call (while already set as flag in the
SHELLEXECUTEINFO) doesn't work out.
Using APIs that cope with window handle(s) is not really an option as it
is quite difficult to determine the correct one. This is because
multiple files can be displayed using the same application.
TIA,
Sinna