Basically, I have a procedure that is essentially a for loop and it goes through a process in which it first calls a windows beep then I delay the for loop with the Sleep() function.
Well, I also want to create an "Abort" button that will kill the for loop for whatever reason I choose. When I start the procedure with the for loop, the Sleep() function freezes the GUI so I cannot click my designated "Abort" button.
The question I have is, what can I do to circumvent this GUI lock? Is there an alternative to Sleep() that I can use or do I have to somehow create a separate thread?
Thanks in advance...
Well, I also want to create an "Abort" button that will kill the for loop for whatever reason I choose. When I start the procedure with the for loop, the Sleep() function freezes the GUI so I cannot click my designated "Abort" button.
The question I have is, what can I do to circumvent this GUI lock? Is there an alternative to Sleep() that I can use or do I have to somehow create a separate thread?
Thanks in advance...