simple
private Image GetImageFromName(string name)
{
Image bmp=(Image)
Properties.Resources.ResourceManager.GetObject("Untitled");
return bmp;
}
This is only for type cast purpose, other wise use getobject directly.
On Wed, Apr 8, 2009 at 10:12 AM, Dan <[email protected]> wrote:
>
> Hello,
>
> I have this in my code
>
> case 0: gblock.DrawImage(Properties.Resources.I1, 0,
> 0, Properties.Resources.I1.Size.Width,
> Properties.Resources.I1.Size.Height); break;
> case 1: gblock.DrawImage(Properties.Resources.O1, 0,
> 0, Properties.Resources.O1.Size.Width,
> Properties.Resources.O1.Size.Height); break;
>
> Times by 20. This looks quite inelegant and I'd like to do it using a
> variable if possible.
> How would I set up the variable and could I still get the width &
> height using that variable?
>
> Many thanks
>
>
> Dan
>
--
My Web Site
http://everlovingyouth.googlepages.com
My Technical Blog
http://acutedeveloper.blogspot.com
Skype :santhoshnta
Orkut :everlovingyouth