Downloads:
Features:
- Live CPU & RAM monitor
- Show number of processors
- Machine total up time
C# Source Code:
- Main.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
using System; using System.Windows.Forms; using System.Diagnostics; namespace CPU_and_RAM_Usage { public partial class Main : Form { PerformanceCounter perMemCounter = new PerformanceCounter("Memory", "Available MBytes"); PerformanceCounter perSystemCounter = new PerformanceCounter("System", "System Up Time"); public Main() { InitializeComponent(); } private void Main_Load(object sender, EventArgs e) { timer1.Start(); txtProcessors.Text = Environment.ProcessorCount.ToString() + " Processors "; } private void timer1_Tick(object sender, EventArgs e) { float fcpu = pCPU.NextValue(); float fram = pRAM.NextValue(); progressBar1.Value = (int)fcpu; progressBar2.Value = (int)fram; txtCPUpercent.Text = string.Format("{0:0.00}%", fcpu); txtRAMpercent.Text = string.Format("{0:0.00}%", fram); txtCPU.Text = txtCPUpercent.Text; txtRAM.Text = txtRAMpercent.Text; txtAvailableMemory.Text = " " + (int)perMemCounter.NextValue() + " " + "MB "; txtTotalUpTime.Text = " " + (int)perSystemCounter.NextValue() / 60 / 60 + " " + "Hours "; } } } |
Screenshots:
Similar Apps:
Unknown
Contact: