图片问题

dlqycyz 2004-02-13 10:07:27
我在picturebox上打开了一幅图片,并且备份了一附件,我对附件进行操作,当我想关闭该图片(并不关闭窗口)的同时怎样删掉附件?部分程序如下:

accessoryFileName = currentFileName.Insert(aa-4,"~1");
File.Copy(currentFileName,accessoryFileName,true);

Bitmap b = new Bitmap(accessoryFileName);

//bitmap = (Bitmap)b.Clone();
bitmap = b;

//删掉附件
private void MenuItemFile_Close(object sender, System.EventArgs e)
{
Redo = 0;
this.redo.Enabled = false;
this.undo.Enabled = false;
//this.bitmap.Dispose();
//this.bitmap = null;
//this.pictureBox1.Dispose();
this.Dispose();

File.Delete(accessoryFileName);//这里好像部队该怎么办???

this.Refresh();
}
...全文
18 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复

110,555

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧