Private Function ShowPic()
Dim bytedata() As Byte
Dim destfile As Integer
Dim file As String
Dim filelen As Long
Dim numlock As Double
Dim leftover As Long
Const blocksize = 100000
file = App.Path & "\image1.jpeg"
destfile = FreeFile
Open file For Binary Access Write As destfile
filelen = RES(0).ActualSize
numlock = filelen / blocksize
leftover = filelen Mod blocksize
bytedata() = RES(0).GetChunk(leftover)
Put destfile, , bytedata()
For i = 1 To numlock
bytedata() = RES(0).GetChunk(blocksize)
Put destfile, , bytedata()
Next i
Close destfile
Picture1.Picture = LoadPicture(App.Path & "\image1.jpeg")
RES.Close
End Function
这是我的获取图像的代码,存储在数据库中并显示在图片框中,每当我运行代码时出现错误,如:Item cannot found in corresponding ordinal or name