I using this code to show image in c# 2008
try
{
string[] fileNames = Directory.GetFiles("\\\\192.168.1.5\\Hani");
foreach (string file in fileNames)
{
if (file.Contains(textBox1.Text))
{
pictureBox1.Image =
Image.FromFile(Path.Combine("\\\\192.168.1.5\\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
Save image from picture box to hard disk proplem
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jun 14, 2014, 12:25 PM EDT
pictureBox1.Image.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);
ahmed saRank #8,218 · 226 reputationPosted Jun 14, 2014, 11:56 PM EDT