This is a short example of how to read/write to a text file. I would suggest you read the documentation available at msdn, for more information.

Anyhow, I would use VBDT's way, it's simpler.

vb.net Code:
  1. Private Sub Form1_FormClosing _
  2.     (ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) _
  3.     Handles Me.FormClosing
  4.         'To write to the file you can do this
  5.         Dim _newscore As String = TextBox1.Text
  6.         IO.File.WriteAllText("filepath", "Your last score was" & TextBox1.Text)
  7.         'Another way of accomplishing the same thing is
  8.         Using writer As New IO.StreamWriter("filepath")
  9.             writer.WriteLine("Your last score was" & TextBox1.Text)
  10.         End Using
  11.     End Sub
  12.  
  13.     Private Sub Form1_Load _
  14.     (ByVal sender As System.Object, ByVal e As System.EventArgs) _
  15.     Handles MyBase.Load
  16.         'Note that ReadAllText returns a string with all the lines of
  17.         'a text file, so I'm assuming the file has one line...
  18.         Dim score As String = IO.File.ReadAllText("filepath")
  19.         'The other thing I'm assuming is that the file says something like
  20.         'Your last score was 1000! Nice!
  21.         MsgBox(score, MsgBoxStyle.Exclamation, "Highscore")
  22.         'Another way to read a text file is this
  23.         Using reader As New IO.StreamReader("filepath")
  24.             Dim _score As String = reader.ReadToEnd
  25.             TextBox2.Text = _score
  26.         End Using
  27.     End Sub