A splash screen is a graphical control element consisting of window containing an image, a logo and the current version of the software. A splash screen usually appears while a game or program is launching. The term may also be used to describe an introduction page on a website (in which case it's often referred to as a "splash page"[1][2]).
Splash screens cover the entire screen or web page, or simply a rectangle near the center of the screen or page. The splash screens of operating systems and some applications that expect to be run full-screen usually cover the entire screen.
So this topic is showing how to build splash screen in C# for introduce your production.
Using below my code, you can easy do it
First create your splash screen
With properties here
Explore My Other Channel for More Cool and Valuable Insights
π Youtube Learn Tech Tipsπ Tiktok
π Facebook:Write code to your splash screen and your main from.
If you want to transparent you can using same color (BackColor and TransparencyKey)
- frmSpalsh.cs -> Using time for delay time remove splash screen
- frmMain.cs -> Load Splash screen in main from
/****************************************************
* Autho; zidane
* Last Modified: 2015-06-06
* GUI: frmSplash.cs
***************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FSSupport
{
public partial class frmSplash : Form
{
public frmSplash()
{
InitializeComponent();
// two code make transparent splash screen
this.BackColor = Color.White;
this.TransparencyKey = Color.White;
}
Timer time;
private void frmSplash_Shown(object sender, EventArgs e)
{
time = new Timer();
time.Interval = 125;
time.Start();
time.Tick += time_Tick;
}
void time_Tick(object sender, EventArgs e)
{
progressBar.Increment(1);
if (progressBar.Value == 100)
time.Stop();
}
}
}
// frmMain.cs
private Thread _tLoadSpashScreen;
private void Form1_Load(object sender, EventArgs e)
{
_tLoadSpashScreen = new Thread(new ThreadStart(loadSplashScreen));
_tLoadSpashScreen.Start();
}
Thank you for reading this post. I hope you found it helpful and easy to follow. If you have any feedback or questions about
,
please share them in the comments below. I would love to hear from you and discuss this topic further
✋✋✋✋
Webzone Tech Tips Zidane, all things tech tips web development
- I am Zidane, See you next time soon ✋✋✋✋