Public Class frmDisplayFile

  Private Sub btnSelect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelect.Click
    Dim textFile As String
    OpenFileDialog1.ShowDialog() 'Open dialog box appears and program
    '                             pauses until a selection is made
    textFile = OpenFileDialog1.FileName
    lstOutput.DataSource = IO.File.ReadAllLines(textFile)
    lstOutput.SelectedItem = Nothing
  End Sub

End Class
