wait a few seconds before next statement

  • Thread starter Thread starter dawn
  • Start date Start date
D

dawn

Hi,

I'm looking for a way to have my app wait a few seconds before performing
the next statement.
I've tried Thread.Sleep(), but that makes my app non-responsive sometimes.
Is there another way to do this?

Thanks
 
For a definate period of time. Sleep is the only way to do this but it
blocks the thread as you seen. Why not put the operations into a thread you
want to do at a set pace then use sleep there, that way youre application
will not be unrepsonsive.
 
Taylor said:
Maybe you could use the IAsyncResult interface along with Thread.Sleep?

Maybe you mean to use Asynchronous Delegates?
"dawn", please, read about it in MSDN. I want to mention that you should
call Thread.Sleep() in the fuction you are calling and not in the
calling code.

Dmirty.
 
Back
Top