Indeed, the solution is two-fold: 1.) Use a timer instead of sleep; sleep does, as it says, makes the thread sleep. 2.) Use multithreading and you can use the screen cropping function in your stream, which will significantly increase the efficiency of your application.
Threading.Thread.Sleep(IntSleepTime)
It is a safe storage function in a thread that pauses the current thread for a specified time, so if you must use sleep, you can do this in a multi-threaded environment, and this will support the rest of your application, since you are a "Branched Sleeping Stream, not main stream.
Jarrod christman
source share