76 964
Assignments Done
Successfully Done
In June 2019

Answer to Question #10415 in C# for csharp

Question #10415
how to make random images in c sharp?
Expert's answer
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RandomImage
public partial class Form1 : Form
private List<Image> listofImage = new List<Image>();
private Random randomnumber = new Random();
public Form1()

for (int i = 1; i <= 8; i++)//8 images add to list listofImage
Image im = Image.FromFile(i.ToString() + ".jpg");
private void timer1_Tick(object sender, EventArgs e)
this.BackgroundImage = listofImage[randomnumber.Next(1, 8)];//Select random number from

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


Assignment Expert
07.06.12, 14:41

You're welcome. We are glad to be helpful.
If you really liked our service please press like-button beside answer field. Thank you!

05.06.12, 19:51

thank you it was harder than i thought

Leave a comment

Ask Your question

Privacy policy Terms and Conditions