[RESOLVED] Hide other program
Hi i'm using mixed MFC and managed C++ in my program.
I want to start another program(Using Process::Start) -> already done
and Hide it. -> TODO
I tried
startInfo->WindowStyle = ProcessWindowStyle::Minimized;
but it's not working.
here's my code
Code:
srvPathName.Append("\\MAINTCP.EXE");
ProcessStartInfo *startInfo = new ProcessStartInfo(srvPathName);
startInfo->WindowStyle = ProcessWindowStyle::Minimized;
startInfo->CreateNoWindow = true;
startInfo->WorkingDirectory = srvPath;
Process* p = Process::Start(startInfo);
ShowWindow((HWND)p->MainWindowHandle.ToPointer(), SW_FORCEMINIMIZE);
Thanks