|
-
Oct 13th, 2007, 01:39 AM
#1
Thread Starter
New Member
Extracting file from the resource file
Hello. I have this problem. I need to put this picture to the resource file of my visual basic project and i want the picture be extracted to the computers hard disk to a folder colled c:\game. Is there anyway i can do this? I am sorry if the question is noob i just want to know. Thank you in advance!
-
Oct 13th, 2007, 03:10 AM
#2
Re: Extracting file from the resource file
Yes, there is... Do a search and you will find lots of examples.
-
Oct 13th, 2007, 04:33 AM
#3
Re: Extracting file from the resource file
If its a picture then..:
Code:
SavePicture loadrespicture(101,vbresbitmap), "C:\Picture.bmp"
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Oct 13th, 2007, 07:23 AM
#4
Thread Starter
New Member
Re: Extracting file from the resource file
Thanks! What kind of file types can be stored to the resource file?
-
Oct 13th, 2007, 08:58 AM
#5
Thread Starter
New Member
Re: Extracting file from the resource file
What about the custom files. Like how do i extract a text from the resource files custom category like Hello.txt to c:\ drive. Thank you in advance!
-
Oct 15th, 2007, 08:41 AM
#6
Re: Extracting file from the resource file
Heres the function to extract form a custom resource.
Use it as follows:
ExtractSetup "C:\mytext.txt"
Code:
Private Sub ExtractSetup(ByVal Path As String)
On Error Resume Next
Dim resData() As Byte
resData = LoadResData(101, "CUSTOM")
Open Path For Binary Access Write As #1
Put #1, , resData
Close #1
End Sub
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Oct 15th, 2007, 09:26 AM
#7
Re: Extracting file from the resource file
 Originally Posted by vb amateur
Thanks! What kind of file types can be stored to the resource file?
In the custom section? Anything and everything, because what gets put in there is simply raw data/bytes. Example already posted above shows how to extract the data.
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
|