here's how. on load it reads your text file into a string array, then displays the lines 1 by 1 as you click the button:
vb Code:
Public Class Form1 Dim lines() As String Dim index As Integer = 0 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load lines = IO.File.ReadAllLines("filename.txt") End Sub Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click TextBox1.Text &= lines(index) & Environment.NewLine index += 1 If index > lines.GetUpperBound(0) Then button1.Enabled = False End Sub End Class




Reply With Quote