Threads listening on TCP and rendering in a loop I have two threads, where one listens on TCP and the other renders in a loop:

  private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            try
            {
                if (ReceiveCheck.Checked)
                {
                    tcplisten.Start();
                    ListenThread = new Thread(new ThreadStart(Listen));
                    ListenThread.Start();
                    RenderThread = new Thread(new ThreadStart(Render));
                    RenderThread.Start();

                }
                else
                {
                    tcplisten.Stop();
                    RenderThread.Abort();
                    ListenThread.Abort();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Checkbox");
            }

        }


Is this a good way of handling the threads, to just start them and later kill them when I want to?
No, this is absolutely not a good way. Thread.Abort() should never be used, because it is very hard to write correct code when an exception can happen at almost any point in your code.

Instead, you should implement cooperative cancellation either by using a volatile bool flag, or, even better, CancellationToken.

With that your code could look like this:

Thread ListenThread;
Thread RenderThread;
CancellationTokenSource CTS;

private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
    try
    {
        if (ReceiveCheck.Checked)
        {
            tcplisten.Start();
            CTS = new CancellationTokenSource();
            ListenThread = new Thread(() =&gt; Listen(CTS.Token)));
            ListenThread.Start();
            RenderThread = new Thread(() =&gt; Render(CTS.Token)));
            RenderThread.Start();
        }
        else
        {
            tcplisten.Stop();
            CTS.Cancel();
        }
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.Message, "Checkbox");
    }
}


Your Listen() and Render() methods would then periodically check IsCancellationRequested of the passed in token and return if it's true.