10-31-2011، 03:11 PM
کد:
//SaveFileDialog saveFileDlg = New SaveFileDialog();
if (saveFileDlg.ShowDialog() == DialogResult.OK)
{
try
{
//Create Bitmap
Bitmap bimg = (Bitmap)this.pictureBox1.Image;
//Save Bitmap to file
bimg.Save(saveFileDlg.FileName,System.Drawing.Imaging.ImageFormat.Jpeg);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "MDI Sample", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}