대략 다음과 같은 시나리오가 될 듯 한데요?
------------
using System.Diagnostics;
...
Process process = new Process();
// Configure the process using the StartInfo properties.
process.StartInfo.FileName = "process.exe";
process.StartInfo.Arguments = "-n";
process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
process.Start();
// 자기 자신의 폼 최소화하기
FormName.WindowState = FormWindowState.Minimized;
process.WaitForExit();// Waits here for the process to exit.
대략 다음과 같은 시나리오가 될 듯
대략 다음과 같은 시나리오가 될 듯 한데요?
------------
using System.Diagnostics;
...
Process process = new Process();
// Configure the process using the StartInfo properties.
process.StartInfo.FileName = "process.exe";
process.StartInfo.Arguments = "-n";
process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
process.Start();
// 자기 자신의 폼 최소화하기
FormName.WindowState = FormWindowState.Minimized;
process.WaitForExit();// Waits here for the process to exit.
이 답글이 거의 정답이긴 한데, 표준을 지키지 않는
이 답글이 거의 정답이긴 한데, 표준을 지키지 않는 프로그램들도 많아서 안될 수도 있습니다.
WinMain 함수에 넘어오는 uShowCmd 값을 무시하는 프로그램들도 있거든요.
그런 경우에는 훅 방식으로 윈도우의 생성을 감지해서 직접 원격으로 컨트롤하는 방법 밖에 없습니다.
===
http://cafe.daum.net/codeinside
오타 냈네요. uShowCmd => nShowCmd
오타 냈네요. uShowCmd => nShowCmd 로 정정합니다.
댓글 달기