Question: I am showing a splash screen on a background thread while my program loads. Once it loads I am aborting the Thread as it's only purpose was to show a Now Loading splash form. 

My problem is that when aborting a Thread it throws a `ThreadAbortException` that the user can just click Continue on.

How do I deal with this? I was trying to suppress it like so -->

```
            try
        {
            Program.splashThread.Abort();
        }
        catch(Exception ex)
        {

        }

```

but I have a feeling that is going to get me yelled at here and it doesn't work any way.

Thanks!

Answer: 
Some points.
The ThreadAbort exception IS the reason the thread aborts. It is not a side effect of you calling abort.
When you call abort on a thread, the runtime forces a threadabort exception to be propagated to the thread. This exception can be caught because it allows the user to perform some cleanup before the thread aborts.

The exception is then rethrown automatically to ensure that the thread is aborted. If the exception was caught and if it was not rethrown the thread would never abort.

Really intelligent design actually.

So it is really OK to catch that exception. In fact you should. But catch only that specific exception and not the general exception. (as shown below)

```
catch(ThreadAbortException ex)
{
   //This is an expected exception. The thread is being aborted
}

```
Try this code. It's working fine for me.

```
void splash()
{
    try {
        SplashScreen.SplashForm frm = new SplashScreen.SplashForm();
        frm.AppName = "HR";

        Application.Run(frm);
    }
    catch (ThreadAbortException ex)
    {
        Thread.ResetAbort();
    }
}

```