Home > DeveloperSection > Forums > Save image from picture box to hard disk proplem
ahmed salah
ahmed salah

Total Post:12

Posted on    June-14-2014 2:06 AM

 C# C# 

 1 Reply(s)
 1958  View(s)
Rate this:

I using this code to show image in c# 2008



string[] fileNames = Directory.GetFiles("\\\\\\Hani");

foreach (string file in fileNames)


if (file.Contains(textBox1.Text))


//pictureBox1.Image = Image.FromFile(Path.Combine("\\\\Hani", textBox1.Text) + ".JPEG");

pictureBox1.Image =

Image.FromFile(Path.Combine("\\\\\\Hani", textBox1.Text)+".JPG");




catch (Exception ex)


MessageBox.Show(ex.ToString ());


it is success in display image but how to save picture in hard disk c drive or d or any location

Sumit Kesarwani

Total Post:378

Posted on    June-16-2014 2:48 AM

Hi Ahmed,

try this :


I hope the above code will help you.

Don't want to miss updates? Please click the below button!

Follow MindStick