Click Event Handler

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 ?
 
G

Guest

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.
 
L

Lou Jackson

it's 1.1 but i'm upgrading. thanks for the tip.

"Ameet Phadnis(e Tek Global Inc.)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top