Hi Guys,
I need to hand in a project tomorrow morning and its almost 6pm here so I need help as soon as possible.
I am trying to get the picture images from the Resource folder because I imported them to the Resource folder but cannot seem to retrieve them.
My code looks like this to retrieve them:
try
{
System.Reflection.Assembly thisExe;
thisExe = System.Reflection.Assembly.GetExecutingAssembly();
System.IO.Stream file = thisExe.GetManifestResourceStream(c.Image);
pic.Image = Image.FromStream(file);
}
catch (Exception exc)
{
MessageBox.Show(exc.Message);
}
Is that correct or how else can I get them from there? I need to put them in a Picture Box.
I get the following exception when trying to retrieve them from the Resource folder:
"Value of 'null' is not valid for 'stream'"
Any help please, its really urgent.
Thanks
Wesley