static void Main(string[] args)
{
Console.BackgroundColor = ConsoleColor.Red;
Console.Write("背景红色");
Console.BackgroundColor = ConsoleColor.Yellow;
Console.Write("背景黄色");
Console.BackgroundColor = ConsoleColor.Black;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("字体黄色");
Console.ReadLine();
}
private void button1_MouseEnter(object sender, EventArgs e) { button1.BackColor = Color.Red; } private void button1_MouseLeave(object sender, EventArgs e) { button1.BackColor = Color.White; } 举个按钮的例子