07/03/14 23:36:37
>>126
Dim a As New IO.FileStream("C:\a.txt", IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.None)
Dim count As Integer
Dim Bytes(a.Length - 1) As Byte
For I As Integer = a.Length - 2 To 0 Step -1
a.Position = I
If a.ReadByte() = 13 And a.ReadByte() = 10 Then
count += 1
If count = 1000 Then
a.Read(Bytes, 0, a.Length - I)
TextBox1.Text = System.Text.Encoding.GetEncoding("Shift-jis").GetString(Bytes)
Exit For
End If
End If
Next
a.Close()
エンコードはシフトJIS
勘で作ったから保障はしないよ