If you have either C#Builder (BDS 1.0), or Delphi 8 (BDS 2.0), you might find that you cannot easily embed “non-standard” resource items into the executable. Stardard resource items are gif, jpg, bmp, ico files.

Well, here's a simple solution. For Delphi 8, use {$R 'filename.ext'}. For C# Builder, use the Project menu, choose “Add To Project”, then, choose any file. Repeat for as many files as desired.

After you're done, save the project. Open the project file (ProjectX.bdsproj) using Notepad, or any text editor. Locate the files you have added. Notice that they read something like, “< FILE ModuleName="Font" ContainerId="" FileName="D:\Digger\Font.png" / >”, assuming you've just added the file Font.png, located in the D:\Digger directory.

The ContainerId is blank. Change the ContainerId's value, such that it contains “Icon”, like so: “< FILE ModuleName="Font" ContainerId="Icon" FileName="D:\Digger\Font.png" / >”.

Once you change the ContainerId's value from “” to “Icon”, save it. Go back to the IDE, and note that the IDE prompts you to reload the project file, as it's time/date changed. Load it, compile it, and you'll find that all the files you've added as a resource now appears properly inside the compiled .NET assembly.