VB释放 多个资源文件
Dimappexe()AsByteDimfilenumAsLongappexe=LoadResData(1,"tupian")filenum=FreeFileOpen"d...
Dim appexe() As Byte
Dim filenum As Long
appexe = LoadResData(1, "tupian")
filenum = FreeFile
Open "d:\Program Files\123\1.jpg " For Binary As #filenum
On Error Resume Next
Put #1, , appexe
Close #filenum
麻烦各位大虾帮我改一下代码
我要释放标识号1~30 类型都是"tupian" 到同一个目录
谢谢 展开
Dim filenum As Long
appexe = LoadResData(1, "tupian")
filenum = FreeFile
Open "d:\Program Files\123\1.jpg " For Binary As #filenum
On Error Resume Next
Put #1, , appexe
Close #filenum
麻烦各位大虾帮我改一下代码
我要释放标识号1~30 类型都是"tupian" 到同一个目录
谢谢 展开
2个回答
2010-07-17
展开全部
Dim bytdata() As Byte
intFile = FreeFile()
bytdata = LoadResData(1, "tupian")
'1 为资源号,tupian为资源类型
strtmpfile = "c:\img\1.jpg"'文件的路径与文件名
Open strtmpfile For Binary Access Write As #intFile
Put #intFile, , bytdata
Close (intFile)
'循环即可,资源号,文件名用变量即可
intFile = FreeFile()
bytdata = LoadResData(1, "tupian")
'1 为资源号,tupian为资源类型
strtmpfile = "c:\img\1.jpg"'文件的路径与文件名
Open strtmpfile For Binary Access Write As #intFile
Put #intFile, , bytdata
Close (intFile)
'循环即可,资源号,文件名用变量即可
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Dim appexe() As Byte
Dim filenum As Long
for i=1 to 30
appexe = LoadResData(i, "tupian")
filenum = FreeFile
Open "d:\Program Files\123\" & i & ".jpg " For Binary As #i
On Error Resume Next
Put #i, , appexe
Close #i
next i
Dim filenum As Long
for i=1 to 30
appexe = LoadResData(i, "tupian")
filenum = FreeFile
Open "d:\Program Files\123\" & i & ".jpg " For Binary As #i
On Error Resume Next
Put #i, , appexe
Close #i
next i
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询