Tools Links Login

Resource File (Custom File Usage)

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 PSC 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

Original Author: Clint LaFever

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 109 times

Categories

Visual Basic 6

Attachments

Resource F251228222001.zip
Posted: 9/3/2020 3:45:00 PM
Size: 348,614 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.