Did soem changes to make a 100* Times Loop to step through the Stream. No checking for EndOfStream
Is that assingment to a new ListBox1.Item correct? (Only the last value of Data, not the previous ones?)
Vb.Net Code:
Try Dim fr As FileStream = File.OpenRead("test.txt") Dim data(fr.Length) As Byte Using reader As New BinaryReader(fr) Dim START As Long = 4896 Dim i As Integer = 0 Do fr.Seek(START, SeekOrigin.Begin) data = reader.ReadBytes(data.Length) START += 1200 i += 1 Loop Until i = 100 ' do loop is done 100 times! fr.Seek(START, SeekOrigin.Begin) data = reader.ReadBytes(data.Length) End Using ListBox1.Items.Add(System.Text.Encoding.UTF8.GetString(data)) fr.Close() Catch End Try




Reply With Quote
