Click Event Handler

  • Thread starter Thread starter Lou Jackson
  • Start date Start date
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 ?
 
Is it in .NET 1.1 or 2.0?
With 2.0 you don't need to do all this, MS has provided background worker
process to do all of the threading stuff.
 
it's 1.1 but i'm upgrading. thanks for the tip.

"Ameet Phadnis(e Tek Global Inc.)"
 
Back
Top