Hi every body.
How can i copy a file in my resource to other folder in my computer.
My file is font file (barcode) :bigyello:
Printable View
Hi every body.
How can i copy a file in my resource to other folder in my computer.
My file is font file (barcode) :bigyello:
When you read the resource from My.Resources you will get it as some type of object. If the original file was a font file then that type may be a Font, otherwise it would be a Byte array. If it's a Byte array then you would be able to call File.WriteAllBytes. If it's a Font then wouldn't need to save it as a file to use it in your app. If you need a file for some other reason then, if it's possible, I think you'd have to use the Windows API to save it. Can you check which type it is?
JM. help me please. IT is array byte().
I used this :
But it did not work. :confused:Code:'Dim binWriter = New IO.BinaryWriter(IO.File.Create("C:\WINDOWS\Fonts\FREE3OF9.TTF"))
'binWriter.Write(My.Resources.FRE3O)
'binWriter.Close()
'Process.Start("C:\WINDOWS\Fonts\FREE3OF9.TTF")
In fact , it work , but that file is not same with original file. And it is not barcode type.
I suggest that you go back and read my previous post again.
I tried this but it did not work :
Code:Dim strw As New StreamWriter("C:\WINDOWS\Fonts\FREE3OF9.TTF")
strw.Close()
File.WriteAllBytes("C:\WINDOWS\Fonts\FREE3OF9.TTF", My.Resources.FRE3OF9X)