执行程序后关闭当前表单 - 在C#中 [英] Close current form after execute a procee - in C#

查看:66
本文介绍了执行程序后关闭当前表单 - 在C#中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我用c#设计的应用程序中,我想在我的表单中执行计算器。

但是当通过以下命令调用它时,当前表单将被关闭。 br />
流程ie = Process.Start(calc.exe);



如何执行此操作,以便当前表单保持打开状态?

非常感谢

Hi In my application which designed by c#, I want to execute calculator in my form .
But when it be called by following command, the current form will be closed.
Process ie = Process.Start("calc.exe");

How can I do this, so that current form remain open?
Thanks very much

推荐答案

事实证明并非如此:当我执行时

That turns out not to be the case: when I execute
Process ie = Process.Start("calc.exe");

Windows计算器出现,我的表格也保持打开状态。只有当我执行代码时

The Windows calculator appears, and my form also remains open. It is only if I execute the code

Process ie = Process.Start("calc.exe");
Close();

结果我的表格发生了任何事情。



我怀疑问题出在另一个部分你的代码。

That anything happens to my form as a result.

I suspect the problem lies in a different part of your code.


这篇关于执行程序后关闭当前表单 - 在C#中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆