【发布时间】:2013-08-21 16:47:40
【问题描述】:
我使用C#语言的windowsform应用程序,我有很多表单,当我想从一个遍历到另一个时,我使用this.Hide();
当我使用此方法时,我收到显示的错误,
我知道解决方案是使用 windows 任务管理器结束进程,但问题是 有什么方法可以在表单之间使用旅行而不导致此错误?
Error 9 Unable to copy file "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 2868
【问题讨论】:
-
这种情况什么时候发生?什么时候重新编译?
-
那是编译/文件系统问题,和你的代码无关。
-
我猜你甚至隐藏了主窗体并试图从另一个 VS 实例重新运行你的应用程序,你为什么不直接关闭 froms?
-
@VahidND,是的,我隐藏了主窗体,当我关闭窗体时它并没有消失,我不知道为什么,只有隐藏功能解决了这个问题
-
如何开始你的主窗体?你是用默认方式启动winform程序吗?我的意思是 Application.Run(new FormMain())
标签: c# winforms visual-studio-2010 forms