i need a thread exit method (Like FormClosing but like ThreadEnding i guess)
theres the code im running. i need something just for when the thread exits.
also i need a formclosing method... i dont know why mine isnt working -.- ive tried everything... even googling and trying those.
Code:
for (int i = 0; i < numericUpDown1.Value; i++)
{
if (runningThreads <= numericUpDown1.Value)
{
az = new Thread(bg2a);
try
{
az.Start();
}
catch (Exception ex) {
MessageBox.Show(Convert.ToString(ex.Message));
}
runningThreads++;
label10.Text = "Threads running: " + runningThreads;
}
}
theres the code im running. i need something just for when the thread exits.
also i need a formclosing method... i dont know why mine isnt working -.- ive tried everything... even googling and trying those.





