splash screen... What and how it gets loaded ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akshaycjoshi
    New Member
    • Jan 2007
    • 153

    splash screen... What and how it gets loaded ?

    I have seen several applications showing one splash screen in the begining which has a progress bar telling the status of loading.

    SO what gets loaded actually ?

    Please give one practical and easy example.

    Maybe this..
    Suppose i have one main form and that form has instances of 3 other forms.
    The three other forms are shown and hidden by 3 buttons.

    when the main form gets loaded , i want the 3 instances to be created, which maybe time consuming.

    So how would i make the splash screen ?
  • sachinkale123
    New Member
    • Jul 2007
    • 37

    #2
    Check out splash screens from following locations...

    CodeProject: A Pretty Good Splash Screen in C#. Free source code and programming help

    best of luck

    Comment

    • vekipeki
      Recognized Expert New Member
      • Nov 2007
      • 229

      #3
      It is nothing more than a Windows form which can be shown quickly while some other operation needs to be done, just to notify the user that the program is already running.

      A simple solution such as this will work:

      Code:
      private void MainForm_Load(object sender, EventArgs e)
      {
          // show the splash form
          SplashForm splash = new SplashForm();
          splash.Show();
      
          // this is a long operation
          for (int i = 0; i < 10; i++)
          {
              // do some work
              System.Threading.Thread.Sleep(500);
          }
      
          // close the splash
          splash.Close();
      
          // bring the MainForm to front
          this.WindowState = FormWindowState.Normal;
      }
      There is a lot of open-source solutions for a splash screen, for example at CodeProject, so you can try searching there also.

      Oops, I didn't see the previous answer, sorry! :)

      Comment

      Working...