以不打破全屏的方式启动新的进程

   Task.Factory.StartNew(() =>
            {
                Thread.Sleep(TimeSpan.FromSeconds(20));

                string process = AppDomain.CurrentDomain.BaseDirectory + @"TargetWPF.exe";
                ProcessStartInfo info = new ProcessStartInfo(process);
                info.WindowStyle = ProcessWindowStyle.Hidden;
                info.UseShellExecute = true;
                Process.Start(info);
                Trace.WriteLine("start  " + process);
            });

如果是C++的程序启动,sw_show应该改为sw_hide.

posted @ 2012-10-24 18:47  xiaokang088  阅读(323)  评论(0编辑  收藏  举报