您的位置:首页 > 编程语言 > C#

C#中打开任务管理器

2015-10-07 21:58 435 查看
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void process1_Exited(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
process1.StartInfo.FileName=@"C:\WINDOWS\system32\taskmgr.exe";
process1.Start();
}
}
}


首先创建一个form窗体然后添加一个窗体,添加一个按钮,一个process控件,双击按钮在代码上添加代码。

以上点击一个按钮就可以打开任务管理器。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: