Login | Register

Visual Basic .NET and CoreTempInfoNET.dll

User feature requests
Planned features for Core Temp
  • Author
    Message

Visual Basic .NET and CoreTempInfoNET.dll

Postby FranzBauer » Sat Mar 12, 2011 8:58 pm

Hey Guys!

Sorry for my English - I can't it really good. It is translated with Google Translator.

I have tried to use the CoreTempInfoNET Library to read the Temperature.
Tried with this Code in VB2008:

Imports CoreTempInfoNET

Public Class Form1
Dim CTInfo As New CoreTempInfo

Private Sub Form1(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Class

Private Sub btn1_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn1.Click
lbl1.Text = CTInfo.GetTemp(0) ' Error
End Sub

End Class

I get an error at the commented position:

The Object reference is not set to an object instance.
But I do not know where is my mistake.
Other Librarys works without problems!

Can you find my mistake?

regards
FranzBauer
FranzBauer
New User
 
Posts: 1
Joined: Sat Mar 12, 2011 8:10 pm

Re: Visual Basic .NET and CoreTempInfoNET.dll

Postby The Coolest » Wed Mar 16, 2011 1:24 pm

Here you go:
Code: Select all
Imports GetCoreTempInfoNET

Public Class Form1
    Dim CTInfo As New CoreTempInfo
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        If (CTInfo.GetData()) Then
            TextBox1.Text = CTInfo.GetTemp(0)
        End If
    End Sub
End Class


GetData() must be called before you can access the rest of the information
Member of our O/C Folding @ Home team
"<The_Coolest> you can't unwaste wasted CPU cycles" - Start FOLDing now!
Main rig:
Core i7 2600K 3.4GHz @ 4.5GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / SSD: Crucial M4 128GB (+ HDDs) / GPU: HD5450 / Mem: 4x4GB DDR3-1600 G.Skill 4GBXL RipJaws X - 16GB total / PSU: Seasonic S12II 620W.
Secondary rig:
Core i3 540 3.06GHz @ Stock / Mobo: MSI H55M-ED55 / GPU: Integrated / Mem: 2x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 4GB total / PSU: FSP ATX350-PNR 350W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors
User avatar
The Coolest
Site Admin
Site Admin
 
Posts: 2961
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest