copy file from resources to a specified file/
I have a font FREE3OF9. (BARCODE FONT).
I want when user run my program, the Font automatic install on their machine.
So i want to copy that font to C disk of user :
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")
I use above code but it is error.
I import that font to my resoures .
And i want to copy that font in my resoure to "C:\WINDOWS\Fonts" of USER .
HOW CAN I DO THAT ? :o
Re: copy file from resources to a specified file/
You say it errors, what's the error? My mind reading skills don't work through the Internet (or well at all for that matter), so can you inform us of the error?
Re: copy file from resources to a specified file/
You don't need a binarywriter, you can just use copy file:
System.IO.File.Copy(My.Resources.FRE3O, "C:\WINDOWS\Fonts\FREE3OF9.TTF")
Re: copy file from resources to a specified file/
Quote:
Originally Posted by
Cyb3rH4Xter
You don't need a binarywriter, you can just use copy file:
System.IO.File.Copy(My.Resources.FRE3O, "C:\WINDOWS\Fonts\FREE3OF9.TTF")
NO, I tried it. BUT IT IS ERROR. BECAUSE the file in resource is not string type.
Re: copy file from resources to a specified file/
Please someone help me ???:afrog:
Re: copy file from resources to a specified file/
In short. How can i copy from a file in my resource to another folder in hard disk ?
Re: copy file from resources to a specified file/
Re: copy file from resources to a specified file/
Quote:
Originally Posted by
manhit45
I have a font FREE3OF9. (BARCODE FONT).
I want when user run my program, the Font automatic install on their machine.
So i want to copy that font to C disk of user :
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")
I use above code but it is error.
I import that font to my resoures .
And i want to copy that font in my resoure to "C:\WINDOWS\Fonts" of USER .
HOW CAN I DO THAT ? :o
What was the error you got? You never said.
-tg
Re: copy file from resources to a specified file/
ok
Infact , after i copy that file.
THE COPY IS NOT SAME WITH ORIGINAL FILE. And it is not barcode type.
while original file is barcode type.:cry: