SAVE IMAGE FROM PICTURE BOX TO HARD DISK PROPLEM

ahmed salah

Total Post:12

Points:84
Posted by  ahmed salah
C# 
C#
 2006  View(s)
Ratings:
Rate this:

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) + ".JPEG");

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

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: Save image from picture box to hard disk proplem

    Hi Ahmed,


    try this :

    pictureBox.Image.Save(@"Path",ImageFormat.Jpeg);

    I hope the above code will help you.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!