C#: CPU and RAM Performance Meter


CPUandRAMMeterC#fig.4In this tutorial, I will teach you how to create a CPU and RAM Performance meter in C#.NET. This method will calculate the percentage and determine the usage of the RAM and CPU of a computer.


Let’s begin:

Open Microsoft Visual Studio 2008, create a new Windows Form Application for C# and drag the Label, ProgressBar, PerformanceCounter and a Timer. It will look like this.



After that, click the “pcCPU” PerformanceCounter and go to the properties. In properties of “pcCPU”, select “Processor” for the Category Name,“% Processor Time” for the Counter Name and “_Total” for the Instance Name.



Then, click  the other PerformanceCounter named “pcRAM” and go to the properties. In the properties, select “Memory” for Category Name and “ %Commited Bytes in Use” for the Counter Name.



After setting up the two performances counter, double-click a Timer to fire the “Tickevent handler. Then, setup the performance and the percentage of the CPUand RAM of the computer in the method.


Go back to the Design Views, and double-click the Form and do the following code to setup interval and start the timer in the first load of the Form.



For all students who need programmer for your thesis system or anyone who needs a source code in any programming languages. You can contact me @ :

Email – [email protected]
Mobile No. – 09305235027 – tnt


Download Sourcecode

Facebook Comments


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.