用Api的话:OpenFile,ReadFile
实际Vb就行呀!
dim bytAry() as byte
dim lngL as long
filhandle = FreeFile()
lngL = filelen(filename)
Open filename for binary as #filehandle
redim bytAry(0 to lngl -1 )
input #filehandle,,bytAry
close #filehandle
Private Sub Command1_Click()
Dim n As Long
Dim arrBytes() As Byte
Open "c:\windows\1stboot.bmp" For Binary As 1 '转换
n = LOF(1)
ReDim arrBytes(1 To n) As Byte
Get 1, , arrBytes
Close 1
Open "c:\temp.bmp" For Binary As 1 '逆转换
Put 1, , arrBytes
Close 1
MsgBox " ok!"