Application pausing: sleep or timers?

  • Thread starter Thread starter BLUE
  • Start date Start date
B

BLUE

I would like to pause an application while the GUI display a Label saying
"Logging in...".

System.Timers
System.Windows.Forms.Timer
System.Threading.Timer
System.Threading ==> Thread.Sleep

Which one?
In the last case Sleep must be applied to what(Application, this or what)?


Thanks,
Luigi.
 
BLUE said:
I would like to pause an application [...]Thread.Sleep

Which one?
In the last case Sleep must be applied to what(Application, this or what)?

Thread.Sleep is most adequate for pausing the aplication. "Sleep" is a
static method of the class System.Threading.Thread, so you just invoke it as
System.Threading.Thread.Sleep(milliseconds), and you don't "apply" it to
anything. Internally it gets applied to the current thread.
 
Hi,


BLUE said:
I would like to pause an application while the GUI display a Label saying
"Logging in...".

Are you sure you want to pause the appp?

That means that NOTHING is executed in the app while it's paused.


I think that what you want is to display a Splash screen while you load your
app.

If this is so take a look in the archives, there are a lot of examples of
how to implement one.
 
Back
Top