Randomise images into a picturebox without repeats.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rizzsid11
    New Member
    • Nov 2011
    • 15

    Randomise images into a picturebox without repeats.

    I've asked this question in the VB forum :(. I am a newbie to VB.NET trying to design a quiz where the user will be presented randomised images to grade. I am at the stage of writing code to randomise image without repeating. 100+ Images are stored in imagelist and are being randomised in picturebox. At the moment my code loops around continuously with repeats. However I would like it to present images randomly without repeating. Here's the randomise snippet of my code. Hellllppp!

    Actually what I'm trying to build is ultimately is a image grading quiz. On my form there is a set of images numbered 1 to 5 (corresponding to a range of normal to severely normal reference images. In a picturebox random images will be presented every 60 seconds. Within the 60 seconds the user will be asked to grade the randomised image. The random image number and the user response needs to be saved in an excel file. The excel file will be sent back to me. I will ask users to repeat this exercise 4 weeks later to look for repeatability of the reference scales.

    I'm not SURE IF a) imagelist is the best way deal with this amount of images. If I remove the image at run time...will I be able to record which image was randomised along with the user response.


    Code:
    ...Button Click
    Dim intPic As Integer
    Dim rand as New Random
    IntPic=rand.Next(0, Imagelist1.Images.Count
    PictureBox1.Image= Imagelist1.Images(intPic)
Working...