|
-
Nov 5th, 2007, 06:50 PM
#1
Thread Starter
Addicted Member
pausing after a command
Hi.
i have this problem.
i dont know how to explain this but it is like this
DoFirstCommand();
Wait();
DoSecondCommand();
its like wait for a few seconds after DoFirstCommand before processing the second one... sort of pause.
-
Nov 5th, 2007, 08:54 PM
#2
Re: pausing after a command
You can call Thread.Sleep if you don't mind the whole thread freezing. If it's your UI thread then that may be an issue. Otherwise you can just start a Timer and call the second method from its Tick event.
-
Nov 6th, 2007, 11:32 PM
#3
Re: pausing after a command
You could also consider using a BackgroundWorker, but the timer seems most suitable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|