private void buttonAddCoach_Click(object sender, EventArgs e) { panel1.Controls.Clear(); UserControlAddCoach uc = new UserControlAddCoach(); panel1.Controls.Add(uc); uc.Dock = DockStyle.Fill; }
private void buttonAddCoach_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); UserControlAddCoach uc = new UserControlAddCoach(); f2.panel1.Controls.Add(uc); uc.Dock = DockStyle.Fill; f2.ShowDialog(); }