title: How can I see temperature of CPU using VB.NET with Open Hardware Monitor DLL
body: <p>I need temperature sensor of CPU in my VB.NET program, I want to use OpenHardwareMonitorLib.dll in  to take values of CPU temp.</p>
  
  <p>I download dll from here: <a href="http://openhardwaremonitor.org/downloads/" rel="nofollow">http://openhardwaremonitor.org/downloads/</a></p>
  
  <p>I have only this code:</p>
  
  <pre><code> Imports OpenHardwareMonitor
  Imports OpenHardwareMonitor.Hardware
  
  Public Class Form1
  
      Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  
      End Sub
  
      Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
          Dim cp As New Computer()
          cp.Open()
          cp.HDDEnabled = True
          cp.FanControllerEnabled = True
          cp.RAMEnabled = True
          cp.GPUEnabled = True
          cp.MainboardEnabled = True
          cp.CPUEnabled = True
  
          Dim Info As String = ""
          For i As Integer = 0 To cp.Hardware.Count() - 1
  
  
              If cp.Hardware(i).HardwareType = HardwareType.Mainboard Then
                  Info += " Motherboard: " &amp; Trim(cp.Hardware(i).Name) &amp; vbCrLf
              End If
              If cp.Hardware(i).HardwareType = HardwareType.CPU Then
                  Info += " Processor: " &amp; Trim(cp.Hardware(i).Name) &amp; vbCrLf
              End If
              If cp.Hardware(i).HardwareType = HardwareType.GpuNvidia Then
                  Info += " Video Card: " &amp; Trim(cp.Hardware(i).Name) &amp; vbCrLf
              End If
              If cp.Hardware(i).HardwareType = HardwareType.RAM Then
                  Info += " RAM: " &amp; Trim(cp.Hardware(i).Name) &amp; vbCrLf
              End If
              If cp.Hardware(i).HardwareType = HardwareType.HDD Then
                  Info += " HDD: " &amp; Trim(cp.Hardware(i).Name) &amp; vbCrLf
              End If
              If cp.Hardware(i).HardwareType = HardwareType.SuperIO Then
                  Info += " SuperIO: " &amp; Trim(cp.Hardware(i).Name) &amp; vbCrLf
              End If
          Next
          TextBox1.Text = Info
  
      End Sub
  
  End Class
  </code></pre>
  
  <p>But with this I only get name of my Hardware I need CPU Temperature.</p>
  
  <p>I tried WMI to use in VB.NET but I get Not Supported message.</p>