none
Set BackColor to a System.Drawing.KnownColor

    Question

  • I want to change the background of a label to Color.Yellow in certain cases and then restore the BackColor to System.Drawing.KnownColor.Control.

    This code doesn't work:

    lblStatus.BackColor = System.Drawing.KnownColor.Control
    What is the correct code?
    Tuesday, November 02, 2010 8:37 PM

Answers

  •     Label1.BackColor = Color.FromKnownColor(System.Drawing.KnownColor.Control)

    • Marked as answer by Bob Heitzman Wednesday, November 03, 2010 3:38 PM
    Tuesday, November 02, 2010 10:01 PM