I am creating a game that requires me to change the background color of a panel, wait 1 second, then change it back. The code I tried was:
button1.BackColor = Color.Blue; System.Threading.Thread.Sleep(1000); button1.BackColor = Color.DimGray; //Dim Gray is the original color
When I use this code it never switches to blue, it just stays the Dim Gray.
I also tried overlaying another Panel colored blue over every panel and setting visibility to false. I then used:
button18.Visible = true; System.Threading.Thread.Sleep(1000); button18.Visible = false;
Again I got the same result, the panel just stayed Dim Gray. Any help is appreciated.