Public Function GetCPUTemp() As Double
Dim i As Integer
Dim mCPU As Variant
Dim u As Variant
Dim s As String
Set mCPU = GetObject("WINMGMTS:{impersonationLevel=impersonate}!root\wmi").ExecQuery("SELECT CurrentTemperature From MSAcpi_ThermalZoneTemperature")
For Each u In mCPU
s = s & u.CurrentTemperature
Next
Set mCPU = Nothing
GetCPUTemp = (s - 2732) / 10
End Function
Private Sub Form_Load()
Timer1.Interval = 500
End Sub
Private Sub Timer1_Timer()
Print GetCPUTemp()
End Sub
Public Function GetCPUTemp() As Double
Dim i As Integer
Dim mCPU As Variant
Dim u As Variant
Dim s As String
Set mCPU = GetObject(
是被关闭了。。。
2毛博客
详细哦