[求助]请教高手,我的写文件程序哪里有错误。
我运行了下面的代码后,复制后的图像特别模糊,请问这是怎么回事如果我复制的是文本文件,复制后的文本文件里面有乱码。
请高手帮我查查哪里错了。谢谢。
Dim FreeF As Integer
Dim LenFile As Long
Dim nCnt As Long
Dim LocData As String
FreeF = FreeFile
Open "f:\desktop.bmp" For Binary As #99
Open "f:\1.bmp" For Binary As #1
nCnt = 1
LenFile = LOF(99)
Do Until nCnt > (LenFile)
LocData = Space$(4096)
Get #99, nCnt, LocData
If nCnt + 4096 > LenFile Then
Put #1,ncnt , Mid$(LocData, 1, (LenFile - nCnt) )
Else
Put #1, nCnt, LocData
End If
nCnt = nCnt + 4096
Loop
Close #99
Close #1我运行了下面的代码后,复制后的图像特别模糊,请问这是怎么回事
如果我复制的是文本文件,复制后的文本文件里面有乱码。
请高手帮我查查哪里错了。谢谢。
Dim FreeF As Integer
Dim LenFile As Long
Dim nCnt As Long
Dim LocData As String
FreeF = FreeFile
Open "f:\desktop.bmp" For Binary As #99
Open "f:\1.bmp" For Binary As #1
nCnt = 1
LenFile = LOF(99)
Do Until nCnt > (LenFile)
LocData = Space$(4096)
Get #99, nCnt, LocData
If nCnt + 4096 > LenFile Then
Put #1,ncnt , Mid$(LocData, 1, (LenFile - nCnt) )
Else
Put #1, nCnt, LocData
End If
nCnt = nCnt + 4096
Loop
Close #99
Close #1我运行了下面的代码后,复制后的图像特别模糊,请问这是怎么回事
如果我复制的是文本文件,复制后的文本文件里面有乱码。
请高手帮我查查哪里错了。谢谢。
Dim FreeF As Integer
Dim LenFile As Long
Dim nCnt As Long
Dim LocData As String
FreeF = FreeFile
Open "f:\desktop.bmp" For Binary As #99
Open "f:\1.bmp" For Binary As #1
nCnt = 1
LenFile = LOF(99)
Do Until nCnt > (LenFile)
LocData = Space$(4096)
Get #99, nCnt, LocData
If nCnt + 4096 > LenFile Then
Put #1,ncnt , Mid$(LocData, 1, (LenFile - nCnt) )
Else
Put #1, nCnt, LocData
End If
nCnt = nCnt + 4096
Loop
Close #99
Close #1