Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 220527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:56:51+00:00 2026-05-11T18:56:51+00:00

I’m using a Splash Screen from Here . I love how simple it is.

  • 0

I’m using a Splash Screen from Here. I love how simple it is. But the problem with it is that the splash screen doesn’t go away until I click on it. When run within the IDE it works fine. Any ideas? I’d attach the code here but its not inserting properly for some reason.

private System.Windows.Forms.Timer timer1;
//private Splash sp=null;

public Form1()
{
    InitializeComponent();

    Thread th = new Thread(new ThreadStart(DoSplash));
    //th.ApartmentState = ApartmentState.STA;
    //th.IsBackground=true;
    th.Start();
    Thread.Sleep(3000);
    th.Abort();
    Thread.Sleep(1000);
}

private void DoSplash()
{
    Splash sp = new Splash();
    sp.ShowDialog();
}

private void timer1_Tick(object sender, System.EventArgs e)
{
//      sp.Close();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:56:51+00:00Added an answer on May 11, 2026 at 6:56 pm

    First of all, the way the splash screen on that page is done, using Thread.Abort, is not the right way to do things.

    Never call Thread.Abort, unless you’re in the process of shutting down the AppDomain the thread lives in.

    Let me reiterate that for emphasis. The only time you should call Thread.Abort is when you know enough about Thread.Abort and how it behaves to know that you should never call it.

    Take a look at this other question on StackOverflow: Multi-Threaded splash screen in c#?.


    If you want to keep your existing solution, a possible better way would be to drop a timer into the splash screen form, set its timer to the time you want the splash screen to stay on screen, and call Close in its Tick event handler.

    In the same venue, I would simply fire off that original thread, and remove the other lines.

    In other words, from the first code block on that page, I would keep these two lines:

    Thread th = new Thread(new ThreadStart(DoSplash));
    th.Start();
    

    Couple that with that timer on the form that makes the form self-closing, and you’re in way better shape than trying to get to grips with Thread.Abort.

    Which you should not call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am doing a simple coin flipping experiment for class that involves flipping a
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.