Hope this will help.
class SplashForm
{
private delegate void CloseDelegate();
private static SplashForm splashForm;
static public void ShowSplashScreen()
{
if (splashForm != null)
return;
Thread thread = new Thread(new ThreadStart(SplashForm.ShowForm));
thread.IsBackground = true;
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
}
static private void ShowForm()
{
splashForm = new SplashForm();
Application.Run(splashForm);
}
static public void CloseForm()
{
splashForm.Invoke(new CloseDelegate(SplashForm.CloseFormInternal));
}
static private void CloseFormInternal()
{
splashForm.Close();
}
...
}
add this class and a loading form in your code.
and change your code to open new form like below.
Private void btn1_Click(object sender, EventArgs e)
{
SplashForm.ShowSplashScreen();
Form2 f2=new Form2();
SplashForm.CloseForm();
this.Hide();
f2.show();
}