c# Programming Glossary: p.processname
How to know a process is 32-bit or 64-bit programmatically http://stackoverflow.com/questions/1953377/how-to-know-a-process-is-32-bit-or-64-bit-programmatically foreach var p in Process.GetProcesses Console.WriteLine p.ProcessName is IsWin64 p string.Empty not 32 bit Console.ReadLine private..
Using PerformanceCounter to track memory and CPU usage per process? http://stackoverflow.com/questions/3411805/using-performancecounter-to-track-memory-and-cpu-usage-per-process ramCounter new PerformanceCounter Process Working Set p.ProcessName PerformanceCounter cpuCounter new PerformanceCounter Process.. cpuCounter new PerformanceCounter Process Processor Time p.ProcessName while true Thread.Sleep 500 double ram ramCounter.NextValue..
UI Automation “Selected text” http://stackoverflow.com/questions/517694/ui-automation-selected-text plist Process.GetProcesses foreach Process p in plist if p.ProcessName notepad AutomationElement ae AutomationElement.FromHandle p.MainWindowHandle..
process tree http://stackoverflow.com/questions/545449/process-tree new PerformanceCounter Process Creating Process ID p.ProcessName var parent GetProcessIdIfStillRunning int performanceCounter.RawValue.. Process 0 pid 1 was started by Process 2 Pid 3 p.ProcessName p.Id parent.ProcessName parent.ProcessId Below is helper stuff.. pid return new MyProcInfo ProcessId p.Id ProcessName p.ProcessName catch ArgumentException return new MyProcInfo ProcessId 1 ProcessName..
|