PDA

Click to See Complete Forum and Search --> : get image from resource file


venerable bede
Mar 5th, 2007, 07:47 AM
I have an image called "imgUnableToDisplay" held in a resource file called "resImages" which is in the root of my application.

Can someone tell me how to get to it ?

I have tried :

System.Drawing.Image img =
(System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("imgUnableToDisplay");

and

System.Drawing.Image img =
(System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("resImages.imgUnableToDisplay");


but no joy.

Thanks In Advance

venerable bede
Mar 5th, 2007, 08:50 AM
Sorry folks it was as simple as :

System.Drawing.Image img = resImages.imgUnableToDisplay