Hello, I found a code snippet online:
But the problem is that the text it outputs isn't properly formatted. It must adhere to a predefined width. Something like the setw() function in C/C++.
Please help!
Thanks!
VB.NET:
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = String.Empty
Using fs As New FileStream("c:\test.txt", FileMode.Open)
fs.Position = 10
Using br As New BinaryReader(fs)
For x As Int16 = 0 To 100
TextBox1.Text &= Asc(br.ReadChar) & " "
Next
End Using
End Using
End Sub
End Class
But the problem is that the text it outputs isn't properly formatted. It must adhere to a predefined width. Something like the setw() function in C/C++.
Please help!
Thanks!