vb6快速读取txt

[ 2021/11/12 12:36 | by admin ]
一、建立模版

Function GetFile(FileName As String) As String
Dim i As Integer, s As String, BB() As Byte
If Dir(FileName) = "" Then Exit Function
i = FreeFile
ReDim BB(FileLen(FileName) - 1)
Open FileName For Binary As #i
Get #i, , BB
Close #i
s = StrConv(BB, vbUnicode)
GetFile = s
End Function

分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]