打开另一个后关闭表格 [英] Close form after open another

查看:107
本文介绍了打开另一个后关闭表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Close form after open another



this.Hide();不工作

this.close();关闭应用程序,不打开另一个表单



我想念的是什么?



我尝试过什么:




this.Hide(); dont work
this.close(); close app, not open another form

What I miss?

What I have tried:

Form1 frm = new Form1();
            frm.Show();
            this.Close();

推荐答案

因为表单1是小孩而你正试图关闭父表单是不可能的,你可以使用



this.Hide();

Form1 frm = new Form1();

frm.Show();
As the form 1 is child and your are trying to close the parent form which is not possible for you can use

this.Hide();
Form1 frm = new Form1();
frm.Show();


这篇关于打开另一个后关闭表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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