private void студентыToolStripMenuItem_Click(object sender, EventArgs e) { StudentsForm form4 = new StudentsForm(); form4.Text = "Студенты"; form4.ShowDialog(); }
private void Students_ToolStripMenuItem_Click(object sender, EventArgs e) { StudentsForm studentsForm = new StudentsForm(); studentsForm.Text = "Студенты"; try { studentsForm.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Ошибка: " + ex.Message, "Ошибка", MessageBoxButtons.OK); } }