[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

Resource files ...

When I create  images with Delphi image editor and save them as Pictures.res
(and add {$R Pictures.res} to my
application),does this mean that Delphi has embedded the pictures into my applications and that I can delete the
actual pictures themselves?
Meaning,that I do not have to ship them with my application if I run my application on another computer?
Also I would like to know if you have to declare *.res on every Form in the application or just on the Main Form?
Thank you!
  • 2
1 Solution
Yes it means you don't need the external files, and you only need to declare it once.
EnejAuthor Commented:
>>external files<< - you mean the actual
*.bmp files used to produce *.res???
  When you produce the res file, the bitmap is put in it, so then you could theoretically delete the bitmap.  Then when you compile the program, the contents of the res file is put in the exe file.
   The *.res statements need to be kept on each form.  If it is on unit1, then it points to unit1.res.  This contains things for the form.  At the least it contains the icon that is used for that form.
Yes - you only need the original BMP's to compile the RES file - not when you are running the program and using something like: image1.picture.bitmap.loadfromresource(...);  Or whatever.

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now