Back


Resource Files etc.

Make sure you have a look at the Delphi resource example that comes with Delphi. It is in your Delphi\Demos\Resxplor directory. The source code is included and it is a very good example of how you can view most of a .exe or .dll resources.

If you use the LoadFromFile method for loading an image into your program you have to include the image file with your .exe
So if you want to have an image of a ball in your program then you have to supply the ball.bmp file and the program.exe so that your software users can see the image.

If you don't want to include the image but you still want it in your program you can load it as a resource into your .exe (executable file), so all you need to do is give your software users the program.exe file because the ball.bmp file is inside or imbedded into your program.exe file.

The big probelm with doing this is that you end up with a much larger .exe file depending on how big the image file is.
You can load many types of files into your .exe files.
Below are some examples of loading from .RES Files Into Your .exe

Warning: Do not change the default resource file that has the same name as your project, Delphi can change that resource file and you could lose your changes.
 
Inserting cursors into your .exe
Inserting an Icon into your .exe
Inserting a .bmp file into your .exe
Inserting a .wav file into your .exe
Inserting a String Table into your .exe
Inserting an AVI file into your .exe

Back