http://www.vb-helper.com/HowTo/resfile.zip

	Purpose
Use resource files

	Method
Use the LoadResData, LoadResPicture, and LoadResString functions. See the notes below and the code for details.

Thanks to Kenneth Ives (kenaso@home.com).

	Disclaimer
This example program is provided "as is" with no warranty of any kind. It is
intended for demonstration purposes only. In particular, it does no error
handling. You can use the example in any form, but please mention
www.vb-helper.com.
----------

 Resource file demo for VB6
 Written by Kenneth Ives  kenaso@home.com

 *** Note ***
 This file was added by selecting "Project", "Add a file".  I then selected
 this text file and checked the box at the bottom of the window labeled
 "Add to Related Documents". 
 ************

 I use two components with this project.  They are located under "Project",
 "Components" on the VB menu bar.

   Animation Control ----- Microsoft Windows Common Controls-2 6.0 (SP3)
   Media Player Control -- Windows Media Player

 If you are going to create a resource file, start VB6 and open your
 project.  On the menu bar, select "Add-Ins", "Add-In Manager ..." and
 scroll down to "VB 6 Resource Editor".  Highlight this selection and
 check the "Load Behavior" check boxes named "Load/Unload" and "Load at
 Startup".  Select "OK".

 Now select "Project" on the menu bar.  At the bottom is a new item named
 "Add New Resource File".  Click on this item and a window will appear
 propmting for a RES file to open.  This is where we are going to name our
 new resource file.  But first, navigate to your project directory and then
 type in the new name.  You will be prompted to create it.  Select YES.

 If you look in your project window, you will see a new item named "Related
 Documents".  Click on the plus (+) sign and ther is your resource file.
 double click on this file to open the resource editor window.  If you drag
 your mouse slowly over the icons you will see a brief description of each
 function.

 The only tricky one is the last icon on the left to add a custom entry.
 Click on this and go find a WAV file.  When it has been added, the title
 says "CUSTOM" and the resource ID is 101.  Let's change it.

 Right mouse click on the 101 and select properties.  Replace "CUSTOM" with
 "SOUND" and include the double quotes.  Tab down and change the 101 to
 1001 or you can put a string name in here.  Like the name of the wave file.
 Whatever you put here, is your reference.  If it is a numeric value, you
 will reference it as a long integer.  If you typed in a name, you will have
 reference it as a string.

 To reference an item created under the "CUSTOM" icon, you will use the VB
 LoadResData() function to retrieve this data into a byte array.  Then load
 the byte array into a temp file so you can access it easily.  Read the
 documentation in this program completely and use the online VB help.

 As you step thru the code, you will find numerous ways that I access the
 resource file for data.  These are the VB functions to look for:

     LoadResData()
     LoadResPicture()
     LoadResString()

