Change
Background Color According to Time
Step-1:-Add/Take Timer into Windows Application.
Step-2:-Create Click Event of Timer
Step-3:-// create object of class Random
-------------------------------------------------------------------------------------------------------------------
Random chng_Clr = new Random();
int TimeInterval = chng_Clr.Next(100000, 999999);
this.BackColor=System.Drawing.ColorTranslator.FromHtml("#"+TimeInterval );
-------------------------------------------------------------------------------------------------------------------
Step-4:-Run the Application.
No comments:
Post a Comment