登录后如何显示主窗体

登录后如何显示主窗体

本文介绍了登录后如何显示主窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

成功登录后如何显示主窗体.

how to show mainform after successful login.

form2.show()
me.close()


终止完整程序
我讨厌做


terminate full program
i hate to do

form2.show()
me.hide()


除了this


any other solution rather than this

推荐答案

static void Main()
{
    LoginForm frmLog = new LoginForm();
    if (frmLog.ShowDialog() == DialogResult.OK)
    {
        Application.Run(new Form2());
    }
    else
    {
        Application.Exit();
    }
}




这篇关于登录后如何显示主窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 00:39