Cylce through pictures

I have several pictures in  "my.resources" that I want to cycle through.  But I haven't been able to figure out a way without typing all of the picture name manually in my code.  Does anybody have any suggestions

Thanks!



Answer this question

Cylce through pictures

  • nscripta

    Thanks!  I ended up putting everything into an array though.
  • Colvic

     

     

    I would recommend that you consider using the imagelist control. It's Wonderful.

    You can load all of the pictures either statically or dynamically and the you can go through them by index or imagename.

    I'm doing this from memory so there may be some errors:

    For i As Short = 0 To ImageList1.Images.Count - 1

    picturebox1.image = ImageList1.Images(i)

    System.Threading.Thread.Sleep(10000)

    Next

     

    Be sure to watch to correctly set the color bit count and pay attention to the transparency scheme. I hope you enjoy.



  • Cylce through pictures