Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim str(2) As String, x As Integer
Dim strLocation As String = Application.StartupPath
strLocation = Replace(strLocation, "bin", "")
str(1) = strLocation & "Form1.vb" : str(2) = strLocation & "Form2.vb"
Dim sr(2) As StreamReader
For x = 1 To 2
sr(x) = New StreamReader(New FileStream(str(x), FileMode.Open))
TextBox1.Text = sr(x).ReadToEnd()
MessageBox.Show("The Number of Lines in " & str(x) & " is:" & Chr(10) & TextBox1.Lines.Length)
sr(x).Close()
Next
End Sub