Dim f As New IO.FileInfo(Application.StartupPath & "\textfile.txt")
Dim filelength As Long = f.Length
Dim sr As New IO.StreamReader(f.FullName)
Me.RichTextBox1.Text = ""
Do While sr.Peek() >= 0
RichTextBox1.AppendText(sr.ReadLine() & vbNewLine)
ProgressBar1.Value = RichTextBox1.TextLength * 100 \ filelength
Loop
sr.Close()
ProgressBar1.Value = 0