ShellAPI

To know Current processes by using Process Class and Shell Functionality


using System.Diagnostics;

private void CurrentProcess_Click(object sender, System.EventArgs e)
{
Process curProc = Process.GetCurrentProcess();
string s = "The total working set of the current process is: " +
curProc.WorkingSet.ToString() + Environment.NewLine;
s += "The minimum working set of the current process is: " +
curProc.MinWorkingSet.ToString() + Environment.NewLine;
s += "The max working set of the current process is: " +
curProc.MaxWorkingSet.ToString() + Environment.NewLine;
s += "The start time of the current process is: " +
curProc.StartTime.ToLongTimeString() + Environment.NewLine;
s += "The processor time used by the current process is: " +
curProc.TotalProcessorTime.ToString() + Environment.NewLine;
DisplayText.Text = s;
}


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: