Set the bitmaps build action to embedded resource and try this code to get
the image and load it in the imagelist:
Dim p As System.Reflection.Assembly
p = System.Reflection.Assembly.GetExecutingAssembly()
Dim img As New Bitmap(p.GetManifestResourceStream(Me.GetType(),
"envelop.jpg"))
ImageList1.Images.Add(img)
hth Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
"Sam" <sa**************@voila.fr> schreef in bericht
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi,
I've added two bitmaps to my project. Now I would like to create an
imagelist (in the code) and add those two images to it (so no path,
just the name). And I want those images to be compiled in the .dll.
This is a user control, so this why I want them to be embedded within
the dll.
Thx