Ok, you were right...I figured oit what to call them using
getmanifestresourcenames.....thanks.
Any idea or suggestions as to why the preloaded ones aren't working (only
in this project)?
Thanks again
8 out of 10 it is a problem with not passing the name correctly (missing
a
namespace or folder name).
Have you tried as per previous suggestion to call
assembly.GetManifestResourceNames? This will tell you the exact names you
have to use.
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
I'm also trying to add it in code like this. This also returns nothing.
The
file is added as embedded resource to project allmidapsdbreplflexgrid.
Dim bmp As New
Bitmap([Assembly].GetExecutingAssembly().GetManifestResourceStream("allmidap
sdbreplflexgrid.anchor.bmp"))
OK, it sounds like it cannot find "resource".
You said you add images; can you try with a single image at a time to
see
which one is the culprit?
Also by calling assembly.GetManifestResourceNames you can find out
which
resources it *does* know about.
Worst case scenario, add your images as embedded resources to the
project
and then manually add them to the ImageList (or other target control)
programmatically
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
1) nope....no other imagelist on form or anywhere in project.
2)I dropped a imagelist control onto form and added images
through
the
collection editor in the IDE.
3)I does throw if I add new form and add imagelist to it.
5) this is the null object from what I can tell:
resources.GetObject("resource")
it returns :nothing".
4)I'm not sure what you mean by adding from toolbar and populatiung
it
(rather than adding pre-populated one)
If I add one with no images added to it, it doesn't throw (if that's
what
you mean).
Is there already another ImageList on the form?
Where does ImageList1 get created?
It throws with existing forms in that project; does it throw if you
add
it
to a *new* form in that project?
Does it throw when you add an ImageList from the toolbar and
populate
it
(rather than adding a pre-populated one)?
What are the values of each element of that line prior to the
exception?
[put a breakpoint on the line and step into]
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
Hi,
I have a somewhat substantial project that won't let me add an
imagelist
(with images that is) to any form without throwing a null
refference
exception when trying to run the following lines of code
(added
by
IDE).
Me.ImageList1.Images.Add(CType(resources.GetObject("resource"),
System.Drawing.Image))
I can create a new project ....add a form ... add an imagelist in
exactly
the same fashion....and it works as if should.
Any ideas as to why this project is giving me fits with
imagelists?
BTW.....It's written in VB.net