Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Waiting / sleeping for one second ?

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
How can I make my application method wait for a second (or some nominated period of time) before coninuing processing ?
I have an issue within a method whereby I'm calling the 'PrintOut' method against a MS Word document. As it stands the code runs too quick and the 'PrintOut' does not get processed (??) - but is successful when I step through my code and delay processing of each code line.
How can I have it such that my method (within a simple .cs file - not in a form) can wait / sleep for a period of time (long enough for the 'PrintOut' method to complete) before continuing ?
It's probably simple and I can't seen it for looking ....
Thanks in advance
Steve
 
Using System.Threading;

Thread.Sleep(tMilliseconds);

-obislavu-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top