private void tabControl1_Selected(object sender, TabControlEventArgs e)
switch(e.TabPageIndex)
case 0:
richTextBox.Text = comboBox1.Text;
break;
// so on for the other page and combos
}
或者,如果您的组合框共享其名称的一个共同的初始部分
private void tabControl1_Selected(object sender, TabControlEventArgs e)
var result = e.TabPage.Controls.OfType<ComboBox>()
.Where(x => x.Name.StartsWith("cboFunction"));