Ye Htut

Ye Htut

  • NA
  • 59
  • 13k

Get Picturebox File Name

Dec 4 2013 4:10 AM
public class photo

picture pbx =new picturebox();


private voide btnok(object sender, EventArgs e)
    {
    string[] files=System.IO.Directory.GetFiles(@"D:\Building_Case");

    for each(string file in files)
    {
     pbx.image=image.fromfile(file);
     }
pbx.DoubleClick+=pbx_DoubleClick;
     }

   void pbx_Double_Click(object sender, EventArgs e)
        {          
            string path=pbx.imagelocation;
            messagebox.show(path);

         
        } 
}
// path string always return null. so I don't know how to get picturebox file path to open with Windows Photo Viewer
plz help me. I am urgent

Answers (1)