private void Form1_Load(object sender, EventArgs e)
{
timer1.Interval = 1000;
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
Double CPUtprt = 0;
ManagementObjectSearcher mos = new ManagementObjectSearcher(@"root\WMI", @"Select * From MSAcpi_ThermalZoneTemperature");
foreach (ManagementObject mo in mos.Get())
{
CPUtprt = Convert.ToDouble(Convert.ToDouble(mo.GetPropertyValue("CurrentTemperature").ToString()) - 2732) / 10;
textBox1.Text = ("CPU 温度 : " + CPUtprt.ToString() + " °C");
}
}
你可以下载一个努大师、驱动精灵等等。其实在任务管理器里面也是有的。