zoukankan      html  css  js  c++  java
  • Process类

      提供对本地和远程进程的访问并使您能够启动和停止本地系统进程。

    public partial class MainWindow : Window
        {
            Process myProcess = new Process();
            public MainWindow()
            {
                InitializeComponent();          
            }
    
            private void btnStart_Click(object sender, RoutedEventArgs e)
            {
                try
                {
                    myProcess = new Process();
                    myProcess.StartInfo.UseShellExecute = false;
                    myProcess.StartInfo.FileName = "WaitPanel.exe";
                    myProcess.StartInfo.CreateNoWindow = true;
                    myProcess.Start();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
    
            private void btnStop_Click(object sender, RoutedEventArgs e)
            {
                myProcess.Kill();
                myProcess = null;
            }
        }
    

      

  • 相关阅读:
    排序
    最小栈
    移除链表元素
    回文链表
    maven自动建立目录骨架
    maven的结构和构建命令
    递归
    链表的中间结点
    括号匹配
    软件工程个人作业01
  • 原文地址:https://www.cnblogs.com/infly123/p/3757605.html
Copyright © 2011-2022 走看看