Method for a nuntess process

xiaoxiao2021-03-06  19

Private Void KillProcess (String ProcessName)

{

System.diagnostics.Process MyProc = New System.Diagnostics.Process ();

// Get all open processes

Try {

Foreach (Process thisproc in process.getprocessessname)

{

IF (! thisproc.closemainwindow ())

{

Thisproc.kill ();

}

}

Catch (Exception EXC)

{

Msg.Text = "Kill" ProcessName "Failed!";

}

}

转载请注明原文地址:https://www.9cbs.com/read-39718.html

New Post(0)