Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / February 2005

Tip: Looking for answers? Try searching our database.

Can't load all the bitmaps as embedded resouces

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BoroDude - 11 Feb 2005 18:41 GMT
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.

Signature

Mark the Boro Dude
Senior Software Hack

joeycalisay - 14 Feb 2005 09:31 GMT
try Roeder's Resourcer:
http://www.aisto.com/roeder/dotnet/

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

Signature

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

> 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.
[quoted text clipped - 13 lines]
> this.imageListBitMaps.ImageSize = new System.Drawing.Size(17, 17);
> this.imageListBitMaps.ImageStream =

((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListBitM
aps.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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.