all groups > dotnet windows forms designtime > february 2005 >
You're in the

dotnet windows forms designtime

group:

Can't load all the bitmaps as embedded resouces


Can't load all the bitmaps as embedded resouces BoroDude
2/11/2005 10:41:01 AM
dotnet windows forms designtime:
Originally the following code worked. I had 9 bitmaps loading as resources
and when I added bitmap 10 as an EmbeddedResource, the bitmap failed to load.
When I step through in the debugger, imageListBitMaps.Images.Count had a
value of 9. I suspect something with VS.NET is failed to recognize the new
bitmap and I think it had to do with the fact that one of my .resx files was
readonly due to Visual Source Safe.

Here is my code to load the bitmap images.

this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources =
new System.Resources.ResourceManager(typeof(DatabaseScript));
this.imageListBitMaps = new System.Windows.Forms.ImageList(this.components);

this.imageListBitMaps.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
this.imageListBitMaps.ImageSize = new System.Drawing.Size(17, 17);
this.imageListBitMaps.ImageStream =
((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListBitMaps.ImageStream")));

Is there any way to get VS.NET to rebuild the resx file? I think that is my
problem, but of course I could be wrong.

--
Mark the Boro Dude
Re: Can't load all the bitmaps as embedded resouces joeycalisay
2/14/2005 5:31:50 PM
try Roeder's Resourcer:
http://www.aisto.com/roeder/dotnet/

Peek into the resx file if your desired image is there...


--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]
((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListBitM
aps.ImageStream")));
[quoted text, click to view]

AddThis Social Bookmark Button