Yo probaría esta función:
Código Delphi
[-]
procedure ActivarAplicacion(Handle: HWnd);
var
FgThreadId : DWORD;
AppThreadId : DWORD;
begin
if IsIconic(Handle) then
ShowWindow(Handle, SW_RESTORE)
else
begin
FgThreadId := GetWindowThreadProcessId(GetForegroundWindow, nil);
AppThreadId := GetWindowThreadProcessId(Handle, nil);
AttachThreadInput(AppThreadId, FgThreadId, true);
SetForegroundWindow(Handle);
AttachThreadInput(AppThreadId, FgThreadId, false);
end;
end;
Handle debe ser el
handle de la aplicación y no de la ventana principal.
Bye