If you loading the image using
Load
method of the PictureBox control then, You can find the name using
picturebox1.ImageLocation
.But if you embed it as resource file, the only thing you can access the image as
Bitmap
from the
Resources
class.
Bitmap image = global::WindowsFormsApplication1.Properties.Resources.BugsBunny;
Or If your resources are
embedded [
^] in the assambly, then you can list them as follows
Assembly assembly = Assembly.GetExecutingAssembly();
string[] resources = assembly.GetManifestResourceNames();
foreach (var resource in resources.Where(r => r.EndsWith(".png") || r.EndsWith(".jpg")))
{
}
I hope this solve your problem.