C#进程启动程序,并禁止原窗口操作

Process myProcess = new Process();
            myProcess.StartInfo.FileName = exeName;
            myProcess.Start();

            while (!myProcess.HasExited)
            {
                this.WindowState = FormWindowState.Minimized;
                System.Threading.Thread.Sleep(1000);
            }
            this.WindowState = FormWindowState.Normal;
            myProcess.Close();

posted @ 2013-08-06 09:41  何卫  阅读(286)  评论(0编辑  收藏  举报