进程没有完全关闭
app.Quit();//好像后面还有参数的吧,好久不写了,不能确定
app.Quit();//好像后面还有参数的吧,好久不写了,不能确定
解决方案 »
- VB err.number对应c#中的异常类型
- 关于数据
- DataSet更新问题
- 从Windows服务启动WindowsApplication问题,求方案
- 引用第三方控件后打包生成的问题
- 如何解决动态属性,事件的绑定??急.!!!!
- 为什么我制作安装时,加入自定义操作后快捷方式的执行结果是重新安装,而不加入自定义操作时,一切正常!
- 如何读取xml节点的属性呀!!!!
- 在csdn崩溃的时候大家遇到C#的问题,去什么论坛问?
- 用C#编校历
- Object reference not set to an instance of an object
- WinFrom在datagrid中,按Delete问问题
app.Workbooks.Close();
app.Workbooks=null;
myApp.Quit(ref Nothing, ref Nothing, ref Nothing);
{
this.app=new Excel.Application();
} private void button2_Click(object sender, System.EventArgs e)
{
this.app.Quit();//不好用啊!!!
}
System.Runtime.InteropServices.Marshal.ReleaseComObject(r2);
System.Runtime.InteropServices.Marshal.ReleaseComObject(app);r1 = null;
r2 = null;
app = null;GC.Collect();return dt;