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.Windows.Forms;
using System.Diagnostics;
using System.Threading;
namespace Process类实例
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void buttonStart_Click(object sender, EventArgs e)
{
Process process1=new Process();
process1.StartInfo.FileName = "notepad.exe";
process1.Start();
}
private void buttonStop_Click(object sender, EventArgs e)
{
//创建新的Process组件的数组,并将它们与制定的进程名称(Notepad)的所有进程资源相关联
Process[] myprocess;
myprocess = Process.GetProcessesByName("Notepad");
foreach(
C# 进程类 Process
最新推荐文章于 2026-05-30 10:40:09 发布
本文详细介绍了C#编程中如何使用Process类来管理和控制操作系统进程。通过实例讲解了如何启动、终止进程,以及获取进程信息等核心操作,帮助开发者深入理解C#进程管理。

1万+

被折叠的 条评论
为什么被折叠?



