L
Lou Jackson
I have a C# .net 2003 program that has a processing loop in a click event
handler for one of the form's controls. The loop has a DoEvents
and a Thread.Sleep for each iteration to simulate a lengthy process. I want
to be able to have the user click a cancel button to set a flag to stop the
looping but I have found that the first click on another control while in
the click event of the first control is not caught by the program. Sometimes
takes many clicks to work at all. Does anyone know what is happening here ?
handler for one of the form's controls. The loop has a DoEvents
and a Thread.Sleep for each iteration to simulate a lengthy process. I want
to be able to have the user click a cancel button to set a flag to stop the
looping but I have found that the first click on another control while in
the click event of the first control is not caught by the program. Sometimes
takes many clicks to work at all. Does anyone know what is happening here ?