I wrote a program that does something every 10 seconds. I am using a sleep, but the program seems to lock up duding the sleep. Is there a better way to do this so the program is not locked up and will respond to a button press? Basically I start the process wiht one button and it loops 1000 times until another button is pressed and a flag is set to false. Currently I have to keep pressing the stop button since the program seems to lock.
System.Threading.Thread.Sl
eep(5000);
Thanks
Start Free Trial