Click here to Skip to main content
15,791,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi I need to show some images say 20-30 images continuously in a series in a image control by clicking Next button.. and also go back in the same order with a button(previous) how can i achieve this ..
Updated 4-May-15 21:01pm
KaushalJB 5-May-15 2:08am    
What have you tried so far ? Update your question with what you have applied

1 solution

use imagelist > choose images to add images click ok
set image size 200X200

Next button code with loading form is

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 EgApp
    public partial class Form1 : Form
        public Form1()

        private void Form1_Load(object sender, EventArgs e)
            Img_idx = 0;
            pictureBox1.Image = imageList1.Images[Img_idx];

        static int Img_idx;
        private void button2_Click(object sender, EventArgs e)
            if (Img_idx < imageList1.Images.Count)
                pictureBox1.Image = imageList1.Images[++Img_idx];

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900