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 WindowsFormsApplication3
{
    public partial class ImageViewer1 : Form
    {
        static int index = 0; 

        public ImageViewer1()
        {
            InitializeComponent();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (index < 6)
            {
                lstPictures.Draw(pbxViewer.CreateGraphics(),
                                                   pbxViewer.Left,
                                             pbxViewer.Top,
                                             index);
                index++;
            }
            else
                index = 0;
        }
    }
}
