I have a resource file that I would like to save to my HDD during run-time however, I'm getting a 0 byte file. This is what Kevin gave me (and was too lazy to help me after that) /
[php] Private Sub FileFromResource(ByVal resource, ByVal outputDir)
Dim bArray() As Byte = resource
Dim fStream As New IO.FileStream(outputDir, IO.FileMode.OpenOrCreate)
Using bWrite As New IO.BinaryWriter(fStream)
Dim i As Integer = 0
Do Until i = bArray.Length
bWrite.Write(i)
i += 1
Loop
End Using
End Sub[/php]
I'm trying to use it on an mp3 file I imported but no progress..
[php]FileFromResource(My.Resources.BGMusic, "BGMusic.mp3")[/php]