如何在C#中以名称关闭表格 [英] How to close form by it's name in C#

查看:123
本文介绍了如何在C#中以名称关闭表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是C#的初学者,并且正在C#中开发小型项目.我有一些基本问题.

我有一个初始屏幕,从此表单(初始屏幕),我显示了另一种用于用户登录的表单.在用户单击登录"按钮输入用户名和密码后,我必须关闭启动屏幕和登录屏幕,并显示主菜单窗口,该窗口为mdi形式.如何解决此问题?

我正在搜索VB6.0中的加载和卸载"表单之类的功能


谢谢,
Madan

Hi,

I''m a beginer for C# and I''m developing small project in C#. I''ve some basic problems.

I''ve one splash screen, from this form(splash screen) I show another form for User login. After user enters user name and password on click of ''Login'' button I have to close Splash screen as well as login screen and show main menu window which is a mdi form. How can I resolve this problem?

I''m searching the functionality like Load and Unload form in VB6.0


Thanks,
Madan

推荐答案

Madan,您可以在任意button_click之类的初始屏幕窗口和登录窗口中创建对象,例如

splashscreen ssw = new splashscreen();
ssw.close();
loginwindow lw = new loginwindow();
lw.close();


Sarath ......
Hi Madan, Create the object of splash screen window and login window in any button_click like

splashscreen ssw=new splashscreen();
ssw.close();
loginwindow lw=new loginwindow();
lw.close();


Sarath......


看看这个 ^ ].


这篇关于如何在C#中以名称关闭表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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