I create a new thread and start it from a main thread.
m_MyThread = new Thread(HandleMyThread);
m_MyThread.IsBackground = true;
m_MyThread.Start();
private void
To restart a thread, try this:
private void button1_Click(object sender, EventArgs e)
{
// Just create a new constructor for the stopped Thread
m_MyThread = null;
m_MyThread = new Thread(HandleMyThread);
m_MyThread.IsBackground = true;
// Then restart the stopped Thread
m_MyThread.Start();
}
This works if the thread was previously stopped.