private Form activeForm = null; private void OpenChildForm(Form childForm) { if (activeForm != null) activeForm.Close(); activeForm = childForm; childForm.TopLevel = false; childForm.FormBorderStyle = FormBorderStyle.None; childForm.Dock = DockStyle.Fill; panelChildForm.Controls.Add(childForm); panelChildForm.Tag = childForm; panelChildForm.AutoScroll = true; childForm.BringToFront(); childForm.Show(); }
private void BtnOpenModuel_Click(object sender, EventArgs e) { string str = !this.rbtnMorning.Checked ? (!this.rbtnEvening.Checked ? (!this.rbtnMeeting.Checked ? "Special" : "Meeting") : "Evening") : "Morning"; new Attendance { sShift = str }.Show(); }
line number 4 user mdiForm Options