Windows窗体应用程序,创建一个导致另一种形式的按钮。 [英] Windows form application, create a button which lead another form.

查看:67
本文介绍了Windows窗体应用程序,创建一个导致另一种形式的按钮。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

c#,visual studio 2012.



我想在打开另一个表单的表单中创建一个按钮。我怎样才能做到这一点。我希望第二种形式取代第一种形式。



谢谢。

c#, visual studio 2012.

I want to make a button in the form which open another form. How can i do that. And i want the second form replace the first form.

Thank you.

推荐答案

尝试:

Try:
Form2 f2 = new Form2();
Hide();
F2.ShowDialog();
Show();


这篇关于Windows窗体应用程序,创建一个导致另一种形式的按钮。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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