VB.NET Resources文件保存本地

'Dim read As Resources.ResourceManager = My.Resources.Resource1.ResourceManager()
 
 
Dim read As Resources.ResourceManager =My.Resources.ResourceManager '‘VS2013’

Dim Bytes As Byte()
Bytes = DirectCast(read.GetObject("Pro"), Byte()) 'filetype必须是binary

Dim file As New IO.FileInfo(Application.StartupPath & "\Pro.mp3")‘绝对或相对文件路径。
Using sw As IO.Stream = file.Create()
sw.Write(Bytes, 0, Bytes.Length)
End Using

猜你喜欢

转载自blog.csdn.net/polloo2012/article/details/79411172