首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

如何将pictureBox中的图片保存到硬盘上

2011-12-30 
怎么将pictureBox中的图片保存到硬盘上谢谢[解决办法]类似如下的代码:this.pictureBox1.Image.Save(@ D:\

怎么将pictureBox中的图片保存到硬盘上
谢谢

[解决办法]
类似如下的代码:
this.pictureBox1.Image.Save(@ "D:\tu.bmp ")
[解决办法]
写的明子的话,就是如下的样子:
private void button1_Click(object sender, EventArgs e)
{
if (this.pictureBox1.Image != null)
{
SaveFileDialog sd = new SaveFileDialog();
if (sd.ShowDialog(this) == DialogResult.OK)
{
this.pictureBox1.Image.Save(sd.FileName);
}
}
}

热点排行