Skip to content

Embedded Resources

You can embed native Windows resources into your compiled programs.

Embedding resources is the process of physically including the information in your compiled programs, so that it does not require to be installed separately.

Types of Resource That Can Be Embedded Into Your Program

Resource Type Description
Bitmaps BMP and RLE bitmap images
Icons ICO icon files
Version Information Version number and text describing your program

Embedding resources provides many benefits, including:

  • Speed: Resources can be loaded faster than they could be from disk.
  • Deployment: By embedding the resources, you will simplify the installation of your applications by deploying fewer files and thereby eliminating the problem of forgetting to deploy all your bitmaps.
  • Transparency: Bitmaps that are loaded from resources can be automatically transformed to have a transparent appearance.

Your compiled EXE program can show an icon resource in Windows Explorer and also when the user Alt-Tabs through Windows tasks.

To add resources to your program, use the Project Properties dialog on the Project menu in the Studio. Read about Using Embedded Resources.

Bitmap Resources

Bitmap resources are bitmap files (*.bmp) that are embedded within the EXE. Once a bitmap file is embedded, you will not need to deploy it. Your program will automatically use bitmap resources in preference to bitmap files.

Icon Resources

Icon resources are bitmap files (*.ico) that are embedded within the EXE. Once an icon file is embedded, you will not need to deploy it. Your program will automatically use icon resources in preference to icon files.

Version Information

Version Information allows you to add revision numbers and descriptive text (such as company name and copyright information) to your program. This information can be viewed by displaying your program’s Properties dialog in Windows Explorer.

Limitations

A chained-to program cannot use bitmap resources, even if it has some embedded that it uses when being run stand-alone. This is because technically, from a Windows perspective, a chained-to program is the same program as the one being chained from (that is, Windows will return the same value for the API function, GetModuleHandle). This is one good reason why you should try to use RunProgram in preference to Chain. If you start a second program with RunProgram, rather than Chain, you can use the bitmap resources in it. One possible solution to this limitation is not to embed the resources for the child process in the child program, but in the master program.