?code,
It doesn't execute more than one thread unless you explicitly tell it
to. If you have code that creates a new thread, then that code is going
to run very fast, because it will spawn the new thread, and then that new
thread will execute new code parallel to the code running in the UI thread
(well, maybe not exactly, depending on number of processors, etc, etc).
What you need to do is set a flag indicating that you already spawned a
thread, and if that flag is set, do not spawn another thread when the
button is pressed.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
?code said:
When I develop an application with VS.NET C#, when I click more than
one time on a button, it seems to execute many threads of the same
function.
How to disable it?
thanks