Process クラスの待ち

http://www.gdncom.jp/general/bbs/ShowPost.aspx?PostID=6833#6911
に書きましたが、Process クラスで他アプリをwaitで動作すると、
Windows+E とかが遅れて有効になります。
なかなかメッセージを処理してくれないのだと思います。Processが!


Process myProcess = new Process();
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("notepad.exe");
myProcess.StartInfo = myProcessStartInfo;
this.Enabled = false;
myProcess.Start();
while (myProcess.Responding) {
Application.DoEvents();
}
this.Enabled = true;
これでOKです。
ただし、別アプリから復帰したときに、後ろに隠れてしまうことが
あるので注意してください。