Delay in splash sceen

  • Thread starter Thread starter Nelson André
  • Start date Start date
N

Nelson André

I'm a begginer so this question will be simple for you I hope.
I have form1.cs that I want to be a splash screen like the MSFT Office
programs have when you start the program.
I want it to show and after a short period of time it disapears and
shows up form2.cs.
My question is how to do the delay?

thanks in advance
Nelson
Portugal
 
Try using a timer component. Set the tick to the amount of time that
you want, and enable it when the form loads.

Make a call to the next form in the OnTick event, showing that form and
hiding the current one. You may also want to disable the timer.

Mike
 
Nelson said:
I'm a begginer so this question will be simple for you I hope.
I have form1.cs that I want to be a splash screen like the MSFT Office
programs have when you start the program.
I want it to show and after a short period of time it disapears and
shows up form2.cs.
My question is how to do the delay?

You need to fake a delay in startup? Good for you :)

You can create a timer (a System.Windows.Forms.Timer will do,
but you need to stop it as soon as it fires.) Alternatively,
you can create a separate thread that carries out non-GUI
in-advance initialization operations, and when that thread
is done, you call a method that finishes the job with
control.BeginInvoke(...)

Jose Solorzano
 
Hi,

There are a number of ways of doing it, you could use either a timer or
Thread.Sleep

Usually this time is used to load any data that your program needs, do a
google search as I have posted the code for this before ( I don't have tge
code here with me now )

cheers,
 
Back
Top