string fname = "";
SaveFileDialog sf = new SaveFileDialog();
sf.Filter = "JPG文件(*.jpg)|*.jpg|BMP文件(*.bmp)|*.bmp";
sf.FilterIndex = 1;
if (sf.ShowDialog() == DialogResult.OK)
{
fname = sf.FileName;
if (fname != "")
{
this.DrawpictureBox.Image.Save(fname, ImageFormat.Gif);
}
}
sf.Dispose();