1) Drag a text box onto your form. Make sure the multiline option is true
2) Drag a button onto your form
Imports System.io
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'read in file
Dim objReader As New StreamReader("C:\test.txt")
Dim sLine As String = ""
Dim lineCounter As Integer = 0
Do
sLine = objReader.ReadLine()
If lineCounter > 0 Then
TextBox1.Text = TextBox1.Text + sLine + System.Environment.NewLine
End If
lineCounter = lineCounter + 1
Loop Until sLine Is Nothing
objReader.Close()
End Sub
End Class
Last edited by iamthwee; Aug 26th, 2008 at 8:12 am.
*Voted best profile in the world*