C# Change A Button's Background Color

前端 未结 7 903
独厮守ぢ
独厮守ぢ 2020-12-01 14:04

How can the background color of a button once another button is pressed?

What I have at the moment is:

ButtonToday.Background = Color.Red;


        
相关标签:
7条回答
  • 2020-12-01 14:39

    I doubt if any of those should work. Try: First import the namespace in the beginning of the code page as below.

    using System.Drawing;
    

    then in the code.

    Button4.BackColor = Color.LawnGreen;
    

    Hope it helps.

    0 讨论(0)
提交回复
热议问题