Dear Marco,
using .res files are best idea because when you add
.res file in your
vb project which contains images
and you make an .exe of it, .res file in now a part
of the .exe. Here we do not need to any extra .dll
files (as said by gbianchi) or a folder that holds the images that is shipped with application where ever it goes. In .res files images are safe. an no one can explicitly delete them and the application need not worry if those images are available when it runs.
If your application is written for displaying images
in the toolbar or in the treeview and if you are
using the Imagelist loaded with the images for these
controls you need to add them in the design time
or at the runtime using the physical files. Now
consider those image files are deleted accidently.
now tell me what is the state of your appilcation?
In such situation i say .res files are best, THE BEST
to use. and images are loaded to imagelist at the
runtime from .res files and then image list is used
by thoso controls which desrves them. Now application
is safe in such cases.
If possible , just give a try in using a imagelist,
add some 10 to 15 images and then reffer it to the
toolbar, then try to change the images in the
imagelist (as if you dont like those images and you
need to add different one). Make the list of steps
that you do. Now do the same with .res files, and
check the diff. Its very comfortable to use it,
BECAUSE IT HAS NO EXTRANEL DEPENDENCIES that app
needs to worry.
I am very much interested in using .res files when
it comes to deal with images (icons, cursors, bmps)
So it is called a RESOURCE file (resources are never
waste) and i dont feel anything wrong in using or
it is not a childish behavior or a WRONG approach.
I am used .res files in so many apps that i have
done in
vb. Till know i never felt it has a problem
or never came accros a problem and i feel satisfied.
If you look in the VS.NET, there .res file is still
improved to the present what i am using in the
VB.
ITS NO LONGER A WASTE.
Okay
Hope this helps.
With Regards,
Raghavendra Mudugal