VB怎样快速将二进制文件转为十六进制字符串?像C32那样.
. 自己UP 文件在磁盘中本来就是二进制保存的,按byte数组读取再转化就行了Option Explicit轻轻的问下,C32是啥? 速度太慢了
Private Sub Command1_Click()
Dim FileName As String, PutFileName As String
Dim lngFile As Long
Dim I As Long, l As Long
PutFileName = "c:\1.txt"
lngFile = FileLen(PutFileName) '取得文件长度
ReDim myfile(lngFile) As Byte '初始化数组
Open PutFileName For Binary As #1 '打开文件
Get #1, I + 1, myfile '将文件写入数组
Close #1 '关闭
For l = 0 To UBound(myfile)
Debug.Print Hex(myfile(l))
Next
End Sub
补充:VB , 基础类