using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;


namespace ImageList_CS
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            #if DEBUG
                MinimizeBox = false;
            #else
                MinimizeBox = true;
            #endif
        }

        private void butAddImage_Click(object sender, EventArgs e)
        {
            Bitmap image = new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream(@"ImageList_CS.home.gif"));
            imgList.Images.Add(image);
            picTest.Image = imgList.Images[0];  
        }

        private void butFromImageList_Click(object sender, EventArgs e)
        {
            picTest.Image = imgList.Images[1];
        }
    }
}