' Collection of code snippets by Arne Vajhøj ' posted to eksperten.dk, usenet and other places (2002-now) Imports System.Windows.Forms Imports System.Drawing Public Class Form1 Private curr As Integer Private imglst As ImageList Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click curr = (curr + 1) Mod imglst.Images.Count PictureBox1.Image = imglst.images(curr) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load imglst = New ImageList imglst.Images.Add(Image.FromFile("C:\red.bmp")) imglst.Images.Add(Image.FromFile("C:\blue.bmp")) End Sub Public Shared Sub Main() Dim f As Form = New Form1 f.ShowDialog() End Sub End Class