private void 红色ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.BackColor = Color.Red;
toolStripStatusLabel1.Text = "红色";
}
private void 绿色ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.BackColor = Color.Green;
toolStripStatusLabel1.Text = "绿色";
}
private void 蓝色ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.BackColor = Color.Blue;
toolStripStatusLabel1.Text = "蓝色";
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
this.BackColor = Color.Red;
toolStripStatusLabel1.Text = "红色";
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
this.BackColor = Color.Green;
toolStripStatusLabel1.Text = "绿色";
}
private void toolStripButton3_Click(object sender, EventArgs e)
{
this.BackColor = Color.Blue;
toolStripStatusLabel1.Text = "蓝色";
}
}
}
原文:http://www.cnblogs.com/lzy2016/p/7565358.html