Skip to content

Using Embedded Resources

Adding Resources to Your Program

Embedding resources into your programs involves two steps:

  1. Use the Project Properties dialog in the Studio to itemize which resources you want.
  2. Compile your program.

When the compiler has successfully compiled your program, it executes a program called a linker that creates the EXE and embeds the resources into it. This process is known as linking. The linker reads the configuration file that the Studio created.

Using Resources in Programs

The use of Bitmap and Icon resources in your programs is mostly automatic, as many properties have been modified to automatically use resources, if available. For example, if you have a line of code like:

Set Bitmap to "World.bmp"

DataFlex will automatically look in the embedded resources for a bitmap called World.bmp and use it. If it doesn’t find one there, it will look on the disk, as it did previously. Other enhancements have been made to images to support transparency.

You can read the version numbers from your program at runtime. To see an example of this, read about the cVersionInfo class.