Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question'ta liste de byte converti en hexa Private listhexa As New List(Of String) Private Sub ReadBinaryFILE(ByVal filename As String) Dim input As System.IO.FileStream Dim listbinary() As Byte listbinary = Nothing If IO.File.Exists(filename) Then input = New IO.FileStream(filename, IO.FileMode.Open) ReDim listbinary(Convert.ToInt32(input.Length - 1)) input.Read(listbinary, 0, listbinary.Length) End If listhexa.Clear() For Each item As Byte In listbinary listhexa.Add(Convert.ToString(item, 16)) Next End Sub
ReadBinaryFILE(Application.StartupPath & "blabla.bla")
While tablen < listhexa.Count
RichTextBox1.Text = RichTextBox1.Text & listhexa(tablen)
tablen += 1
End While
Private listbinary() As Byte
Private Function ReadBinaryFILE(ByVal filename As String) As Boolean
If File.Exists(filename) Then
listbinary = File.ReadAllBytes(filename)
Return True
Else
Return False
End If
End Function
Private Sub showlist()
Dim listhexa As New List(Of String)
For Each item As Byte In listbinary
listhexa.Add(Convert.ToString(item, 16))
Next
ListBox1.Visible = False
ListBox1.DataSource = listhexa
ListBox1.Visible = True
End Sub
' pour utiliser
If ReadBinaryFILE("the path of the file" ) Then
showlist()
End If