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 BackgroundImage_CS
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            #if DEBUG
                MinimizeBox = false;
            #else
                MinimizeBox = true;
            #endif
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            // получим картинку из ресурсов
            Bitmap backgroundImage = 
                new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("BackgroundImage_CS.sochicat.jpg"));

            e.Graphics.DrawImage(backgroundImage, this.ClientRectangle,
                new Rectangle(0, 0, backgroundImage.Width, backgroundImage.Height),
                GraphicsUnit.Pixel);
        }


    }
}