我是VB新手.刚刚有人给了我一段代码.下面这一段代码是把 资源文件101释放到当前文件夹下.但是我资源文件里还有几个我想把102,103,104,105也放出来.101=1.exe 102=2.exe 103=3.exe 104=4.exe 105=5.exe请问这样的话要怎么写呀.Dim TempDataPath As StringPrivate Sub Form_Load()Dim TempData() As ByteTempDataPath = App.Path & "\1.exe"TempData = LoadResData(101, "CUSTOM")Open TempDataPath For Binary Access Write As #1Put #1, , TempDataClose #1End Sub
1 回答
拉丁的传说
TA贡献1789条经验 获得超8个赞
Dim TempDataPath As String
Private Sub Form_Load()
Dim TempData() As Byte
for i= 1 to 5
TempDataPath = App.Path & "\"&trim(i)&".exe"
TempData = LoadResData(100+i, "CUSTOM")
Open TempDataPath For Binary Access Write As #1
Put #1, , TempData
Close #1
next i
End Sub
添加回答
举报
0/150
提交
取消