一、新建两个登录窗体命名为frmLogin和frmMain
登录窗体属性设置:
1.MaximizeBox为:False
2.MinimizeBox为:False
3.ShowIcon 为:False
4.text为:登录
5.FormBorderStyle为:FixedSingle
二、修改Program.cs文件
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
}
将主窗体设置为第一个运行窗体:Application.Run(new frmMain());