Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to make Splash Screen?

How to make Splash Screen?

Scheduled Pinned Locked Moved C#
tutorialcsharphelpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Khoramdin
    wrote on last edited by
    #1

    Hello everyone, I am trying to add a Splash Screen to my Windows Application. I have searched the internet and I have came across "A Pretty Good Splash Screen in C#" by Tom Clement. As I tried to follow the Tom's tutorial, I came to the point that he asks, "Add a Windows Form to the project and name it SplashScreen. Delete Form1.cs.". I am wondering if I delete my Windows Form, then what I am making the splash screen for?!!! I am puzzled and I was wondering if someone can help me out on this. Thank you very much and have a great day. Khoramdin

    R S H 3 Replies Last reply
    0
    • K Khoramdin

      Hello everyone, I am trying to add a Splash Screen to my Windows Application. I have searched the internet and I have came across "A Pretty Good Splash Screen in C#" by Tom Clement. As I tried to follow the Tom's tutorial, I came to the point that he asks, "Add a Windows Form to the project and name it SplashScreen. Delete Form1.cs.". I am wondering if I delete my Windows Form, then what I am making the splash screen for?!!! I am puzzled and I was wondering if someone can help me out on this. Thank you very much and have a great day. Khoramdin

      R Offline
      R Offline
      RepliCrux
      wrote on last edited by
      #2

      Here is one of the easiest one: In your main Program.cs call a Form: --Name that form splash screen, --Set the property 'FormBorderStyle' = 'None' --call a method show splash so basically you will write as below: public SplashForm() { InitializeComponent(); } public void ShowSplash() { Thread.Sleep(1000); this.Close(); } Now in main write this: SplashForm f2 = new SplashForm(); f2.Show(); f2.ShowSplash(); This will work as a splash screen!!

      1 Reply Last reply
      0
      • K Khoramdin

        Hello everyone, I am trying to add a Splash Screen to my Windows Application. I have searched the internet and I have came across "A Pretty Good Splash Screen in C#" by Tom Clement. As I tried to follow the Tom's tutorial, I came to the point that he asks, "Add a Windows Form to the project and name it SplashScreen. Delete Form1.cs.". I am wondering if I delete my Windows Form, then what I am making the splash screen for?!!! I am puzzled and I was wondering if someone can help me out on this. Thank you very much and have a great day. Khoramdin

        S Offline
        S Offline
        Sathesh Sakthivel
        wrote on last edited by
        #3

        Better ask your question to Tom Clement itself instead of posting it here. there is a Discussion board below the article.

        Regards, Satips.:rose: Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Walk beside me, and just be my friend. - Albert Camus

        1 Reply Last reply
        0
        • K Khoramdin

          Hello everyone, I am trying to add a Splash Screen to my Windows Application. I have searched the internet and I have came across "A Pretty Good Splash Screen in C#" by Tom Clement. As I tried to follow the Tom's tutorial, I came to the point that he asks, "Add a Windows Form to the project and name it SplashScreen. Delete Form1.cs.". I am wondering if I delete my Windows Form, then what I am making the splash screen for?!!! I am puzzled and I was wondering if someone can help me out on this. Thank you very much and have a great day. Khoramdin

          H Offline
          H Offline
          help as an alias
          wrote on last edited by
          #4

          Try this it is workin on my project its also from "A Pretty Good Splash Screen in C#" by Tom Clement. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace GasDistributionManagement { public partial class SplashScreen : Form { static int var =0; public SplashScreen() { InitializeComponent(); } private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { } private void SplashScreen_Load(object sender, EventArgs e) { this.ClientSize = this.BackgroundImage.Size; timer1.Start(); } private void timer1_Tick(object sender, EventArgs e) { var++; progressBar1.Value++; if (progressBar1.Value != 100) { int i = 1 + ((100 - var) / 8); if (i / 3 > 2) { Timelabel.ForeColor = System.Drawing.Color.DarkViolet; Timelabel.Text = "Time Remaining is " + i + " Seconds"; } else if (i / 3 == 2) { Timelabel.ForeColor = System.Drawing.Color.Red; Timelabel.Text = "Time Remaining is " + i + " Seconds"; } else { Timelabel.ForeColor = System.Drawing.Color.DarkKhaki; Timelabel.Text = "Time Remaining is " + i + " Seconds"; } } else { timer1.Stop(); this.Hide(); Login log = new Login(); log.Show(); } } } }

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups