如何打开一个新的独立表格? [英] How to open a new independent form?
本文介绍了如何打开一个新的独立表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将从代码开始:
private void button_newform_Click(object sender, EventArgs e)
Form newF = new Form();
newF.show();
我有一个带有按钮的表单,可以打开一个新表单.
I have a form with a button who can open a new form.
问题是,新表单具有父级.
the problem is, the new form have parent.
例如,如果我单击 newform
按钮,它将创建一个新表单.
for example, if I'll click on newform
button, it will create a new form.
但是当我关闭此表单时,新表单也将关闭.
but when I close this form, the new form will be closed too.
如何从现有表单创建独立表单?
how to create an independent form, from an existing form?
推荐答案
发生这种情况的原因是因为在project->应用程序属性中,关闭模式设置为启动表单关闭时的
.将其更改为 Last表单关闭时
.
The reason this is happening is because in the project->application properties, the shutdown mode is set to When startup Form closes
. Change that to When Last form closes
.
这篇关于如何打开一个新的独立表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文