title: vb.net read file line by line and copy some part of the Line
body: <p>I have this code to read the read the lines of a file (16file) and then show each line in a textbox (tWLine), one at a time but the code below shows all the contents of the file at once. However I want it such that after a line of the file is read, it is shown in the textbox (tWline) and then a button is clicked before the next line is read and shown in the textbox again till the last line in the 16file.</p>
  
  <p>The second part will be to copy the words in the line that is read into textboxes based on the number  of the word in the line (1st word into txt1, 2nd into txt2, etc) but I will be most grateful to at least get through with even the first part alone.</p>
  
  <pre><code>    `Dim fRdr As StreamReader
  
      fRdr = File.OpenText("C:\users\sk\16file.txt")
  
      'Loop through to read Lines
      Do Until fRdr.EndOfStream
          tWLine.Text = tWLine.Text &amp; fRdr.ReadLine &amp; vbCrLf
      Loop
      fRdr.Close()`
  </code></pre>
  
  <p>I would like the textbox contents to appear like the code below shows the messages one line at a time so that after each line has shown in the tWline textbox, some form of code will be performed before the next line is read and then the same thing will be done for the next line till the last line in the file is reached.</p>
  
  <pre><code>    `Private Sub bReadFA_Click(sender As Object, e As EventArgs) Handles bReadFA.Click
      For Each Line As String In File.ReadLines("C:\users\sk\16file.txt")
          MsgBox(line)
      Next
  End Sub `
  </code></pre>