猿问

可以帮帮忙解释一下,关于VB这一段代码的问题?

我是VB新手.
刚刚有人给了我一段代码.
下面这一段代码是把 资源文件101释放到当前文件夹下.
但是我资源文件里还有几个
我想把102,103,104,105也放出来.
101=1.exe 102=2.exe 103=3.exe 104=4.exe 105=5.exe
请问这样的话要怎么写呀.
Dim TempDataPath As String
Private Sub Form_Load()
Dim TempData() As Byte
TempDataPath = App.Path & "\1.exe"
TempData = LoadResData(101, "CUSTOM")
Open TempDataPath For Binary Access Write As #1
Put #1, , TempData
Close #1
End Sub

慕容3067478
浏览 258回答 1
1回答

拉丁的传说

Dim TempDataPath As StringPrivate Sub Form_Load()Dim TempData() As Bytefor i= 1 to 5TempDataPath = App.Path & "\"&trim(i)&".exe"TempData = LoadResData(100+i, "CUSTOM")Open TempDataPath For Binary Access Write As #1Put #1, , TempDataClose #1next iEnd Sub
随时随地看视频慕课网APP
我要回答