窗体上放入一个多行文本框(带纵向滚动条),一个命令按钮:
Private Sub Command1_Click() Dim ss() As Byte,i As Long Open "e:\tmp\123.txt" For Binary As #1 ss = InputB(LOF(1),#1) Close #1 For i = 0 To UBound(ss) If i > 0 And (i Mod 16) = 0 Then Text1.SelText = vbCrLf
Text1.SelText = Right("0" & Hex(ss(i)),2) & " "
endif
Next End Sub原文链接:https://www.f2er.com/vb/259497.html