Results 1 to 2 of 2

Thread: get image from resource file

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    get image from resource file

    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 :
    Code:
    System.Drawing.Image img = 
    (System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("imgUnableToDisplay");
    and
    Code:
    System.Drawing.Image img = 
    (System.Drawing.Image)Properties.Resources.ResourceManager.GetObject("resImages.imgUnableToDisplay");
    but no joy.

    Thanks In Advance

    Parksie

  2. #2

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Re: get image from resource file

    Sorry folks it was as simple as :

    System.Drawing.Image img = resImages.imgUnableToDisplay

    Parksie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width