通过关闭第一个表单来打开表单的问题 [英] problem in opening a form by closing first form

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

问题描述

我有2种形式的登录n登录.
在正确的登录名下,我想打开登录表单.
但是当我编写代码以正确登录时打开登录时,它会打开,但是当我在登录负载上编写login.close()或login.Hide()时,两种形式都将关闭.我不明白如何.请帮助我...

i have 2 forms login n signin.
on the correct login i want to open the signin form.
but as i write the code to open the signin at correct login it opens but when i write the login.close() or login.Hide() on load of signin both forms are closing. i dont understand how. please help me......

推荐答案

登录表单是您应用程序的主要表单.您需要使其不是主要形式.在您的应用中,如下代码:

The login form is the main form of your application. You need to make it not the main form. In your app, the code that is like this :

Application.Run(new MainForm());




正在运行您的登录表单.让它运行另一种形式(登录形式),并在显示自身之前显示登录形式.




is running your login form. Have it run another form instead ( the signin form ) and have that show the login form before showing itself.


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

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