Hi,
I have 1 solution with 2 projects (ClassLibraray1 - which currently have 6
images embedded in a resource file and WinFormApp1 - which has a picturebox
and a listbox) I'm trying to display the list of image names in the listbox.
I have searched the web and can only find examples of displaying images if
you know the resource name.
In my WinFormApp1 I have
private void Form1_Load(obje ct sender, EventArgs e)
{
ResourceManager rm = new
ResourceManager (typeof(ClassLi brary1.Resource 1));
pictureBox1.Ima ge = (Bitmap)rm.GetO bject("space_wo rld");
}
How do I get the list of images in the ClassLibrary resource file?
Ultimately I am going to pick a random image from the ClassLibrary and
display it in the Picturebox.
Thanks
Steve
I have 1 solution with 2 projects (ClassLibraray1 - which currently have 6
images embedded in a resource file and WinFormApp1 - which has a picturebox
and a listbox) I'm trying to display the list of image names in the listbox.
I have searched the web and can only find examples of displaying images if
you know the resource name.
In my WinFormApp1 I have
private void Form1_Load(obje ct sender, EventArgs e)
{
ResourceManager rm = new
ResourceManager (typeof(ClassLi brary1.Resource 1));
pictureBox1.Ima ge = (Bitmap)rm.GetO bject("space_wo rld");
}
How do I get the list of images in the ClassLibrary resource file?
Ultimately I am going to pick a random image from the ClassLibrary and
display it in the Picturebox.
Thanks
Steve