Results 1 to 3 of 3

Thread: Loading a splash screen...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    London UK
    Posts
    255

    Unhappy Loading a splash screen...

    I have a main form and I want to hide it, load a splash screen, run the splash screen's Load event, hide the splash screen and finally show the main form again. This is what I've got so far:

    main form Load event:
    VB Code:
    1. private void frmMain_Load(object sender, System.EventArgs e)
    2.      {
    3.      this.Hide();
    4.      frmSplash SplashScreen = new frmSplash();
    5.      SplashScreen.Show();
    6.      }

    splash screen Load event:
    VB Code:
    1. private void frmSplash_Load(object sender, System.EventArgs e)
    2.      {
    3.      <code i want executed>
    4.      <code to show the main form again>
    5.      this.Close();
    6.      }

    Any ideas on what I should put to show the main form again? Can it be done using it's handle?
    Not at all related to sheep...

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Try this:
    Code:
    private void frmMain_Load(object sender, System.EventArgs e)
         {
         this.Visible = false;
         frmSplash SplashScreen = new frmSplash();
         SplashScreen.ShowDialog();
         this.Visible = true;
         }

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Found this which is really good code on how to implement a splash screen.
    http://www.fawcette.com/vsm/2003_04/...ne/columns/qa/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width