I need to change the background colour of a button using C# code (Visual Studio 2008).
I saw some people recommending the inclusion of a directive: us
This should change your button background color to Red
yourButtonName.BackColor = Color.Red;
You need to include System.Drawing namespace as Color class belongs to that. Like this
using System.Drawing;
And ofcourse you need to add the reference to System.Drawing DLL in your project to use this namespace and Color class.
