1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
Imports System.IO
Dim br As BinaryReader
Dim bw As BinaryWriter
Dim fs As FileStream
Try
fs = File.Open(Form1.OpenFileDialog1.FileName, FileMode.Open)
br = New BinaryReader(fs)
While fs.Position < fs.Length
'###########################################
If Form1.Choix.Text = "Code" Then
Form1.Code.Text = Form1.Code.Text & (br.ReadInt32)
End If
End While
Finally
'Fermeture Binaryreader
If Not IsNothing(br) Then br.Close()
'Fermeture Binarywriter
If Not IsNothing(bw) Then bw.Close()
End Try |
Partager