private void chooseimage() { //April 6th, birthday of windows 3.1 if (DateTime.Now.Month == 4 && DateTime.Now.Day == 6) { useBackground = panWin31.BackgroundImage; } else { //select a random start image from the available start images. Image[] selectfrom = new Image[] { panStandard.BackgroundImage, panStandard2.BackgroundImage, panStandard3.BackgroundImage }; Image useimage = selectfrom[rgen.Next(selectfrom.Length)]; useBackground = useimage; } //new as of July 14th 2011: colourize to a random hue 50% of the time. if (rgen.NextDouble() > 0.5d) { //choose a random colour... Color colourizeto = new HSLColor(rgen.NextDouble() * 240, 240, 120); ImageAttributes attribcolourize = new ImageAttributes(); attribcolourize.SetColorMatrix(ColorMatrices.GetColourizer((float)(colourizeto.R) / 255, (float)(colourizeto.G) / 255, (float)(colourizeto.B) / 255)); useBackground = BCBlockGameState.AppyImageAttributes(useBackground, attribcolourize); } }