我的表单嵌入在标签页的顶部。当我关闭标签页顶部的表单时,如何也关闭标签页?
当我将表单放在标签页上时的代码更像这样:
client c = new client(car_name, owner); //here client is another winform class
c.TopLevel = false;
c.Visible = true;
c.BackColor = Color.Ivory;
c.FormBorderStyle = FormBorderStyle.None;
c.Dock = DockStyle.Fill;
tabControl1.TabPages[tab_index].Controls.Add(c);