VB如何在文件每两个字节后添加一个空格?
发布网友
发布时间:2024-10-23 12:52
我来回答
共2个回答
热心网友
时间:2024-11-02 16:45
Private Sub Command1_Click()
Dim a1 As String
Open "OLoad15.jpg" For Binary As #8
If Dir("c:\###OLoad15_002.txt") <> "" Then Kill "c:\###OLoad15_002.txt"
Open "c:\###OLoad15_002.txt" For Binary As #9
Do Until EOF(8)
a1 = a1 & Right("0" & Hex(AscB(InputB(1, #8))), 2)
a1 = a1 & Right("0" & Hex(AscB(InputB(1, #8))), 2)
a1 = a1 & " "
Loop
Put #9, , a1
Close #8
Close #9
End Sub
热心网友
时间:2024-11-02 16:46
用提取那个函数,从左边起一次提取两字节然后用&连接下一次提取的两字节,最后另存下…