Splash Screen C#.NET PROGRAM

What our code does is get the image we set as Background Image and creates a Bitmap object as a copy of the same image. Next, we call Make Transparent method of the Bitmap class that gets a color as an argument and makes it transparent.
Splash.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace splashscreen
{
    public partial class Splash : Form
    {
        public Splash()
        {
            InitializeComponent();
            Bitmap b = new Bitmap(this.BackgroundImage);
            b.MakeTransparent(b.GetPixel(1, 1));
            this.BackgroundImage = b;
        }
        private void Splash_Load(object sender, EventArgs e)
        {
        }
    }
}
Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace splashscreen
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Thread th = new Thread(new ThreadStart(DoSplash));
            th.Start();
            Thread.Sleep(3000);
            th.Abort();
            Thread.Sleep(1000);
                    }
        public void DoSplash()
        {
            Splash sp = new Splash();
            sp.ShowDialog();
     }
          }
}

OUTPUT 
 
Share:

Total Pageviews

CONTACT US

Prof. Roshan P. Helonde
Mobile: +917276355704
WhatsApp: +917276355704
Email: roshanphelonde@rediffmail.com

Enter Project Title

Popular Projects

All Archive

Contact Form

Name

Email *

Message *