First question: I want to make my program wait before continuing but when I use Sleep() it temporarily hangs my program and the GUI becomes completely unresponsive which is annoying and just doesnt seem right. I need to use Sleep in these places but is there anyway to do it differently so that my program just sits there for that amount of time without totally freezing up?
Second question: I wrote a function to output some things to a telnet session. Tested it, works great. Now I wanted to call the function twice in a row and I started getting Assertion Failures. Since the function is dealing with a telnet server I thought maybe it was going to fast and screwing up so I put a Sleep(1000) in between the 2 calls and still have the problem. So then I go to debug and put a break point at the second function call, when it hit the break I immediatly hit Continue and it worked fine. So why in the world would this happen? If it pauses at the break point for 1 second it works but if I let it sleep for 1 second it doesnt. WTF??