|
-
Dec 27th, 2009, 02:42 AM
#1
Thread Starter
Fanatic Member
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 ?
-
Dec 27th, 2009, 05:13 AM
#2
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?
-
Dec 27th, 2009, 05:29 AM
#3
Hyperactive Member
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")
-
Dec 27th, 2009, 05:55 AM
#4
Thread Starter
Fanatic Member
Re: copy file from resources to a specified file/
 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.
-
Dec 27th, 2009, 08:05 AM
#5
Thread Starter
Fanatic Member
Re: copy file from resources to a specified file/
Please someone help me ???
-
Dec 27th, 2009, 08:45 AM
#6
Thread Starter
Fanatic Member
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 ?
-
Dec 28th, 2009, 04:28 PM
#7
Thread Starter
Fanatic Member
Re: copy file from resources to a specified file/
-
Dec 28th, 2009, 07:32 PM
#8
Re: copy file from resources to a specified file/
 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 ? 
What was the error you got? You never said.
-tg
-
Dec 28th, 2009, 08:11 PM
#9
Thread Starter
Fanatic Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|