//close this form private void StopEditing() { UserCarBooker childBooker = new UserCarBooker(this.Email, this.PassHash); childBooker.MdiParent = ParentForm; childBooker.FormBorderStyle = FormBorderStyle.None; childBooker.Dock = DockStyle.Fill; childBooker.Show(); }
//on Click function. in the empty space of the page show the child form which show the possible booking fot the user private void ShowBookingForm(object sender, EventArgs e) { UserCarBooker carBookerChild = new UserCarBooker(this.Email, this.PassHash); carBookerChild.MdiParent = this; carBookerChild.FormBorderStyle = FormBorderStyle.None; carBookerChild.Dock = DockStyle.Fill; carBookerChild.Show(); }