📅  最后修改于: 2022-03-11 14:48:54.746000             🧑  作者: Mango
foreach (ToolStripMenuItem item in menuStrip1.Items)
{
item.ForeColor = Color.Red;
item.BackColor = Color.Blue;
foreach (ToolStripMenuItem children in item.DropDownItems)
{
children.ForeColor = Color.Red;
children.BackColor = Color.Blue;
}
}