private void Login_Click(object sender, EventArgs e) { LoginForm log = new LoginForm(); if (log.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string name = log.username; int pass = log.pass; StaffInterface staff = new StaffInterface(); staff.setUserPass(name, pass); staff.ShowDialog(); } }