Hi TS,
Thanks for your feedback.
Yes, because once you set an image for the picturebox in property browser,
this image will be embeded in the assembly as resource, it will has no
relation with the picture on the disk, and it makes no sense for the
resource to store the image path information. Also, the user may have
deleted , modified or moved the original image on the disk.
So for your issue, I think you may retrieve the image resource from the
assembly and save it again to the disk. Like this:
private void button1_Click(object sender, System.EventArgs e)
{
Assembly ass=Assembly.LoadFrom(@"You picturebox assembly");
string[] res_name_arr=ass.GetManifestResourceNames();
foreach(string str in res_name_arr)
{
Console.WriteLine(str);
}
Type t=ass.GetType("accesstest.Form1");
System.Resources.ResourceManager resources = new
System.Resources.ResourceManager(t);
System.Drawing.Image
img=(System.Drawing.Image)(resources.GetObject("pictureBox1.Image"));
img.Save(@"D:\\savedpic.bmp");
}
=========================================
Please apply my suggestion above and let me know if it helps resolve your
problem.
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.