I am trying to use the following code to get whats from a txt file on my website when the user clicks the button the code is in and then if the number in the code is greater than the number in a label on the form then it does something, if its less than or equal to the number in the label it does something else..
But it doesn't seem to be working for me, it has to be something pretty simple I have wrong:
But it doesn't seem to be working for me, it has to be something pretty simple I have wrong:
Visual Basic:
Dim CurrentVersion As String
On Error Resume Next
Dim srCurrentVersion As System.IO.StreamReader = _
New System.IO.StreamReader("http://www.rs-sidekick.com/Client/CurrentVersion.txt")
Dim line, vals() As String
Do
line = srCurrentVersion.ReadLine
If line Is Nothing Then Exit Do
vals = line.Split(vbTab)
CurrentVersion = vals(0)
Loop
srCurrentVersion.Close()
srCurrentVersion = Nothing
If CurrentVersion > lblMyVersion.Text Then
MessageBox.Show("Newer version is available!")
End If
If CurrentVersion <= lblMyVersion.Text Then
MessageBox.Show("You have the newest version of RS SideKick.")
End If