private void timer1_Tick(object sender, EventArgs e)
{
intSpinCount++;
if (intSpinCount <= 20) {
// 轉動中;
Random rnd = new Random();
int intIndex = rnd.Next(imageList1.Images.Count);
//0到imageList1.Images.Count隨機取一;
2~6省略
pictureBox1.Image = imageList1.Images[intIndex];
2~6省略
} else { // 停止; //隨機取值;
Random rnd = new Random();
int myIndex = rnd.Next(imageList1.Images.Count);
//0到imageList1.Images.Count隨機取一;
2~6省略
pictureBox1.Image = imageList1.Images[myIndex];
timer1.Enabled = false;
ifSpin = false;
btnAnimateImage.Enabled = true;
btnAnimateImage.Text = "動態切換圖片"; }
產生結果如圖http://imgur.com/2AakeZL
想要讓六個號碼彼此之間不重複,GOOGLE研究半天研究不出個所以
拜託高手指點一下方向!!