VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Resource File (Custom File Usage)

by Clint LaFever (19 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (14 Votes)

Example code that will show how you can use the custom section (and LoadResData) of the resource file to store misc. files into your executable. Along with that, if one of the files is a .WAV file, to play it directly from the resource file without extracting it. Other parts of the code will show how you can embed JPG files into the resource file instead of .BMP files and use those files for your images in your program. This will help lower the size of your program if you love to use images in your program. Using the same code it will also show how you can extract out files to the users hard drive that were put in the resource file. A good usage of this is lets say you have a DB application and would like to give the ability to make a new DB file, but you want to make sure the DB has the write structure and filled with default data. Just embed your DB file into the resource and extract it out to a new file when the user wants a new file. I know a few days ago somebody else posted code similar, but I had this up here on VBC a long time ago (been removed since) and thought that since resource files can provide so much, it would be a good idea to post again for those who missed the other authors post.
KEYWORDS: WAVE WAV RESOURCE LOADRESDATA CUSTOM SOUND PLAY EMBED SNDPLAYSOUND SND_ASYNC SND_LOOP

Rate Resource File (Custom File Usage)

Download Resource File (Custom File Usage)

Download Resource File (Custom File Usage) (331 KB)

Resource File (Custom File Usage) Comments

No comments have been posted about Resource File (Custom File Usage). Why not be the first to post a comment about Resource File (Custom File Usage).

Post your comment

Subject:
Message:
0/1000 characters