我想以另一种形式关闭用户在 ListView 框中选择的进程。ListView 框使用复选框来选择要关闭的进程。不幸的是,我不知道如何将检查的进程转换为进程....有什么帮助吗?
public void Form4_Load(object sender, EventArgs e)
{
Process[] prs = Process.GetProcesses();
listView1.Items.Clear();
foreach (Process proces in prs)
{
if (!string.IsNullOrEmpty(proces.MainWindowTitle))
listView1.Items.Add(proces.MainWindowTitle);
}
foreach (Process PRC in listView1.CheckedItems)
{
\\Idk what to put here.
}