using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace LibraryApp { public partial class LibraryApp : Form { Users UserForm = new Users(); Login LoginForm = new Login(); public LibraryApp() { InitializeComponent(); UserForm.MdiParent = this; LoginForm.MdiParent = this; LoginForm.Show(); } private const int CS_NOCLOSE = 0x200; protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ClassStyle = cp.ClassStyle | CS_NOCLOSE; return cp; } } private void Exit_Click(object sender, EventArgs e) { Application.Exit(); } private void LibraryApp_Load(object sender, EventArgs e) { } private void StudentsView_Click(object sender, EventArgs e) { UserForm.Show(); } private void Login_Click(object sender, EventArgs e) { LoginForm.Show(); } } }