官方QQ群:127876820【C#编程技术-全国站--未满人】

winform 退出进程C#


 System.Diagnostics.ProcessStartInfo p = null;
                System.Diagnostics.Process Proc;
                string path = System.IO.Directory.GetCurrentDirectory();


                if (!File.Exists(path + "\\gmz.exe"))
                {
                    MessageBox.Show(System.IO.Directory.GetCurrentDirectory() + "\\empty.exe不存在");
                }
                p = new ProcessStartInfo(path + "\\empty.exe", "Hisign.ACS.Main.exe");
                p = new System.Diagnostics.ProcessStartInfo(path + "JWMJJ.exe");
                p.WorkingDirectory = path;//设置此外部程序所在windows目录
                p.WindowStyle = ProcessWindowStyle.Hidden;//在调用外部exe程序的时候,控制台窗口不弹出
                //如果想获得当前路径为

                Proc = System.Diagnostics.Process.Start(p);//调用外部程序
                System.Threading.Thread.Sleep(100);

posted @ 2010-09-22 17:20  碧海蓝天_C#  阅读(429)  评论(0编辑  收藏  举报
官方QQ群:127876820【C#编程技术-全国站--未满人】