You can read the Text File using the Below mentioned Code in vb.net and also in the windows application :Dim LineOfText As String
Try
Dim StreamToDisplay As StreamReader
StreamToDisplay = My.Computer.FileSystem.OpenTextFileReader(Trim(BatchNo & "")) 'Here The Text File Reader is opened by taking its path
Do Until StreamToDisplay.EndOfStream 'Here by using the loop we can read the text file until it reaches the end of file
LineOfText = StreamToDisplay.ReadLine() 'Here you can read the line
LineOfText = LineOfText & vbCrLf
TextBox1.Text &= LineOfText
Loop
Catch ex As Exception
End Try
Here You can download the Example code For it .............SAMPLE TEXT FILE READING CODE
-
0 comments:
Post a Comment