using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
namespace Uso_CPU
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
PerformanceCounter CPU = new PerformanceCounter( "Processor", "% Processor Time", "_Total");
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = (CPU.NextValue().ToString() + " %");
}
}
}
No hay comentarios:
Publicar un comentario
Nota: solo los miembros de este blog pueden publicar comentarios.