public Form1() { collegeEntities = new CollegeEntities(); courseForm = new CourseForm(); enrollmentForm = new EnrollmentForm(); instructorForm = new InstructorForm(); majorForm = new MajorForm(); sectionForm = new SectionForm(); studentForm = new StudentForm(); InitializeComponent(); }
private void CourseForm_Click(object sender, EventArgs e) { courseForm = new CourseForm(); courseForm.Show(); //these forms will only show once and then the program will crash for some reason }