在新工艺产卵形式 [英] Spawning form in new process

查看:93
本文介绍了在新工艺产卵形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最初创建一个Windows窗体是我的项目主要形式的对话。现在对话框越来越复杂,以至于它需要在其自己的过程中被启动。有没有办法做到这一点在code或者我需要创建一个新的项目,我的文件链接到它?

I had originally created a windows form to be a dialog of my projects main form. Now the dialog is getting complex enough that it needs to be started in its own process. Is there a way to do this in code or do i need to create a new project and link my files to it?

推荐答案

我在这里质疑premise - 没有理由在一个单独的进程必然开始新的形式。如果表单越来越那么复杂,但是,我会建议简化它,如果没有理由比其他的易用性。

I question the premise here - there is no reason to necessarily start a new "form" in a separate process. If the form is getting that complex, however, I would recommend simplifying it, if for no reason other than usability.

话虽这么说,你可以随时通过的的Process.Start 在code。如果你希望它是在同一个项目,但启动一个单独的进程,你可以使用命令行参数,可这形式在启动时加载到切换启动执行exe文件。

That being said, you can always launch a new process via Process.Start in code. If you want it to be in the same project, but start a separate process, you could launch the executing exe with a command line argument that allows you to switch which "form" is loaded at startup.

这篇关于在新工艺产卵形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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