古詩詞大全網 - 古詩大全 - vb 釋放資源文件問題

vb 釋放資源文件問題

例子:

Dim temp() As Byte

temp = LoadResData(101, "CUSTOM") 'ico

Open "D:\1.ico" For Binary As #1

Put #1, 1, temp()

Close #1

temp= LoadResData(102, "CUSTOM") '圖片

Open "D:\2.jpg" For Binary As #1

Put #2, 1, temp()

Close #2

temp = LoadResData(103, "CUSTOM") 'exe

Open "D:\3.exe" For Binary As #1

Put #3, 1, temp()

Close #3

temp = LoadResData(104, "CUSTOM") '光標

Open "D:\4.cur" For Binary As #1

Put #4, 1, temp()

Close #4